LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-04-2016, 04:36 AM   #1
chris_crunch
Member
 
Registered: Jan 2016
Location: Braintree, Essex
Distribution: Ubuntu 14.04
Posts: 107

Rep: Reputation: Disabled
What does this installation error mean?


Hi, I'm checking if I have NumPy installed;

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/__init__.py", line 22, in <module>
from .npyio import *
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/npyio.py", line 12, in <module>
from . import format
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/format.py", line 171
def _check_version(version):
^
SyntaxError: invalid syntax
>>>


What is this madness?

I'm assuming it would have been
except ImportError:
print "numpy is not installed"
 
Old 02-04-2016, 04:41 AM   #2
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Hi..

If you're using any distribution in the Ubuntu family, you probably already have numpy installed. Simply bring up the Synaptic package manager and look for the package "python-numpy." There are other related packages you can install (if you want,) too.

EDIT: Just noticed you're using Xubuntu....

Regards...

Last edited by ardvark71; 02-04-2016 at 04:43 AM. Reason: Added information.
 
Old 02-04-2016, 04:44 AM   #3
NGIB
Member
 
Registered: Sep 2013
Location: Sumter SC, USA
Distribution: MX, Lubuntu
Posts: 449

Rep: Reputation: Disabled
Xubuntu may not have Synaptic installed only Software Center (which I hate). Easy enough to use software center to install synaptic though...
 
Old 02-04-2016, 04:48 AM   #4
chris_crunch
Member
 
Registered: Jan 2016
Location: Braintree, Essex
Distribution: Ubuntu 14.04
Posts: 107

Original Poster
Rep: Reputation: Disabled
Thanks guys, I'm really struggling here... how do I find out if I have this package manager, if so, how do I run it, and if I don't, how to I get it...

I know, I suck, but I'll get better soon... haha
 
Old 02-04-2016, 04:56 AM   #5
ardvark71
LQ Veteran
 
Registered: Feb 2015
Location: USA
Distribution: Lubuntu 14.04, 22.04, Windows 8.1 and 10
Posts: 6,282
Blog Entries: 4

Rep: Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842Reputation: 842
Quote:
Originally Posted by chris_crunch View Post
Thanks guys, I'm really struggling here... how do I find out if I have this package manager, if so, how do I run it, and if I don't, how to I get it...

I know, I suck, but I'll get better soon... haha
Hi...

Don't run yourself down, we all start from the beginning with everything.

Click on the "Start Menu" and look under "System." If it's not there, open a terminal and run this command....

Code:
sudo apt-get install synaptic
That should install it for you. Just click "y" when you are asked "y/n" questions. Onother way to install Synaptic is through the Ubuntu Software Center. Both ways should work well.

Regards....
 
Old 02-04-2016, 04:59 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
the printed path shows that is the package numpy, therefore that is not an installation issue (of numpy) (I mean the package is already available).
I would rather check your own code, probably you wanted to do something invalid (that's why you got invalid syntax).
Since the source is stdin I have no any idea about the content.

How did you try to check it?

Last edited by pan64; 02-04-2016 at 05:01 AM.
 
Old 02-04-2016, 05:02 AM   #7
chris_crunch
Member
 
Registered: Jan 2016
Location: Braintree, Essex
Distribution: Ubuntu 14.04
Posts: 107

Original Poster
Rep: Reputation: Disabled
It's not an installation issue? Then what... The only code I wrote was:

>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/__init__.py", line 22, in <module>
from .npyio import *
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/npyio.py", line 12, in <module>
from . import format
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/format.py", line 171
def _check_version(version):
^
SyntaxError: invalid syntax
>>>
 
Old 02-04-2016, 05:05 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
so try to reinstall
apt-get install -f --reinstall python-numpy
 
Old 02-04-2016, 05:08 AM   #9
chris_crunch
Member
 
Registered: Jan 2016
Location: Braintree, Essex
Distribution: Ubuntu 14.04
Posts: 107

Original Poster
Rep: Reputation: Disabled
chris@chris-crunch:~$ sudo apt-get install -f --reinstall python-numpy
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 to upgrade, 0 to newly install, 1 reinstalled, 0 to remove and 11 not to upgrade.
Need to get 0 B/1,603 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 216187 files and directories currently installed.)
Preparing to unpack .../python-numpy_13a1.8.2-0ubuntu0.1_amd64.deb ...
Unpacking python-numpy (1:1.8.2-0ubuntu0.1) over (1:1.8.2-0ubuntu0.1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up python-numpy (1:1.8.2-0ubuntu0.1) ...
chris@chris-crunch:~$ python
Python 2.7.11 |Anaconda 2.4.1 (64-bit)| (default, Dec 6 2015, 18:08:32)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>> import numpy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/__init__.py", line 180, in <module>
from . import add_newdocs
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/__init__.py", line 22, in <module>
from .npyio import *
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/npyio.py", line 12, in <module>
from . import format
File "/home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg/numpy/lib/format.py", line 171
def _check_version(version):
^
SyntaxError: invalid syntax
>>>


 
Old 02-04-2016, 05:10 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
so remove /home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg and its content (or move it outside of that python directroy structure)
 
1 members found this post helpful.
Old 02-04-2016, 05:14 AM   #11
chris_crunch
Member
 
Registered: Jan 2016
Location: Braintree, Essex
Distribution: Ubuntu 14.04
Posts: 107

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
so remove /home/chris/anaconda2/lib/python2.7/site-packages/numpy-1.12.0.dev0+12ec338-py2.7-linux-x86_64.egg and its content (or move it outside of that python directroy structure)
Thanks, it's working now! Phew.

How did you know that was the problem?
 
Old 02-04-2016, 05:17 AM   #12
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,792

Rep: Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306Reputation: 7306
because the "normal" package you installed was: Setting up python-numpy (1:1.8.2-0ubuntu0.1) - it has a different version number.
I do not know what was in that directory, but definitely not the official package. Probably you tried something...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
After installation I get, Error 25: Disk read error, Press any key to continue ... mataitsane Linux - Newbie 5 06-06-2012 10:45 AM
Installation error during installation of RHEL 5 using usb drive sunrave Red Hat 1 05-14-2012 05:22 AM
Installation of Binutils(configure:error:installation or configuration problem:C ...) h_r0019 Linux From Scratch 1 05-05-2007 07:40 AM
xen installation error: error 13: invalid or unsupported executable format Niceman2005 Linux - Software 0 01-05-2007 01:51 AM
Error on Fedora core 4 installation - Error informing the kernal about modifications monolegis Fedora 2 02-15-2006 06:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration