Can't see numpy etc after upgrading Python on Ubuntu

Vincent Vande Vyvre vincent.vande.vyvre at
Tue Dec 20 03:36:20 EST 2016

Le 20/12/16 à 08:45, Chris Angelico a écrit :
> On Tue, Dec 20, 2016 at 5:19 PM,  <ozpeterballard at> wrote:
>> 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?
> You just installed pip into your /usr/bin/python, not
> /usr/local/bin/python. You'll need to get pip in that Python and use
> that. I'm not sure the best way to install pip into a 2.7 - someone
> else on this list can advise.
> ChrisA

It seems you have shadowed your default python2 with the new one. A very 
bad idea.

You can have two python2 but you can't replace the default version.

The default is in /usr/lib and the new is in /usr/locale/lib

The third party libs are into the default version. For this reason 
there's probably some applications that are broken. (apport, bzr, 
synaptic?, ...)

The link /usr/bin/python *MUST* point to the 2.7.3 version, if not, 
restore it.

One solution for use the new version is to create the necessary symbolic 
links into /usr/locale/lib/python2.7/dist-packages which point to 
/usr/lib/python2.7/dist-packages numpy, scipy and others.

In fact, this is the same think when you create a virtual environment, 
the libs are not copied but linked.


More information about the Python-list mailing list