Custom Search

Monday, June 1, 2015

python Permanently add a directory to PYTHONPATH sys.path

1)
Print all paths

#python -c "import sys; print sys.path"

2)
Find easy-install.pth

#find /usr -name *.pth

3)
Edit easy-install.pth and add your paths

#sudo vim /usr/local/lib/python2.7/dist-packages/easy-install.pth

4)
Print all paths again

#python -c "import sys; print sys.path"


No comments:

Post a Comment