Home:ALL Converter>Python versions cannot locate modules in Ubuntu

Python versions cannot locate modules in Ubuntu

Ask Time:2014-05-09T02:48:48         Author:user36047

Json Formatter

In my Linux (ubuntu 12.04) system, I have python2.7.3 in /usr/bin and python2.7.5 in /usr/local/bin

The modules like numpy are installed into /usr/share/pyshared (by default when I use sudo apt-get install python-numpy)

python2.7.3 can import the modules without any problems, while python2.7.5 cannot locate the modules. I have added /usr/share/pyshared to $PATH variable using /etc/profile, but python2.7.5 still cannot find the modules.

Any suggestions?

Author:user36047,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/23550149/python-versions-cannot-locate-modules-in-ubuntu
yy