Skip to content Skip to sidebar Skip to footer

Python Can't Find Modules With Pythonpath Set

I’m totally confused with new python 2.7.10. I've installed python 2.7.10 from tar.xz, which was downloaded from official site. Then I've linked /usr/local/bin/python2.7 with /us

Solution 1:

It seems that you have two python versions.

The default version generally is linked to:

/usr/bin/python 

As you can see from which -a python, your local version lives inside:

/usr/local/bin/python 

this is linked to your local binary with

/usr/bin/python 

pip install installs packages using the default python. This is the reason you can't import the packages from your local installation even if the package is visible in your $PYTHONPATH.

In case python -m pip install doesn't install the desired packages on your local version try creating a virtual environment (Do not use sudo)

In case everything fails or you are desperate, install a clean Anaconda and stay out of trouble.

I hope that works

Post a Comment for "Python Can't Find Modules With Pythonpath Set"