Thanks Chris for replying, but it didn't work. The upgrade happened, but still 
python can't see numpy! So it seems to be a path problem. The numpy (and scipy 
and matplotlib) files are there, so surely in principle it's a simple matter of 
pointing my python path at them?

Any ideas how?

(I should add, the reason I upgraded python from source in the first place is 
that "apt-get" claimed python was up to date).

p.s. Here's an abridged log:

peter@sirboris:~$ which python
/usr/local/bin/python

peter@sirboris:~$ pip
The program 'pip' is currently not installed.  You can install it by typing:
sudo apt-get install python-pip

peter@sirboris:~$ sudo apt-get install python-pip
[lots of output, pip installed]

peter@sirboris:~$ which pip
/usr/bin/pip

peter@sirboris:~$ sudo pip install numpy
Requirement already satisfied (use --upgrade to upgrade): numpy in 
/usr/lib/python2.7/dist-packages
Cleaning up...

peter@sirboris:~$ sudo pip install numpy --upgrade
[lots and lots of output, successful install]

peter@sirboris:~$ python
Python 2.7.12 (default, Dec 11 2016, 22:16:38) 
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named numpy
>>> import sys
>>> sys.path
['', '/home/peter', '/home/peter/dvd/software/python', 
'/home/peter/Cython-0.25.2', '/usr/local/lib/python27.zip', 
'/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', 
'/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', 
'/usr/local/lib/python2.7/lib-dynload', 
'/usr/local/lib/python2.7/site-packages']

# [Then I thought, maybe "pip" and "python -m pip" are different, so...]

peter@sirboris:~$ sudo python -m pip install numpy
/usr/local/bin/python: No module named pip
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to