I am having trouble adding a directory to my PYTHONPATH
The directory is /usr/local/lib/python2.7/dist-packages
When I run
PYTHONPATH=/usr/local/lib/python2.7/dist-packages python -c 'import sys; print sys.path'
I can't find it in the result.
Trying things out I noticed the following:
The directory disappears from sys.path when /usr/local/lib/python2.7 is there as a prefix, e.g. the following works fine:
PYTHONPATH=/usr/local/lib python -c 'import sys; print sys.path'
I am not setting PYTHONPATH anywhere else, and I checked running it with sudo.
/usr/local/lib/python2.7/dist-packagesisn't already in your path? It won't be added to the front if it is already listed.PYTHONPATH=/usr/local/lib/python2.7/dist-packages python -c 'import sys; print "/usr/local/lib/python2.7/dist-packages" in sys.path'PYTHONPATH=/usr/local/lib/pythn2.7/dist-packages python -c 'import sys; print "/usr/local/lib/pythn2.7/dist-packages" in sys.path'Truenormpathon the entries)