Skip to content

Instantly share code, notes, and snippets.

@julienr
Created March 19, 2016 10:17
Show Gist options
  • Save julienr/489ada2ac45f35fc4901 to your computer and use it in GitHub Desktop.
Save julienr/489ada2ac45f35fc4901 to your computer and use it in GitHub Desktop.
fixing python path

Fixing strange python sys.path in virtualenv

I had /usr/lib/python2.7/dist-packages in the sys.path of a no-global-site-packages venv

Good ref regarding python sys.path

http://mikeboers.com/blog/2014/05/23/where-does-the-sys-path-start

Find .pth files :

find venv/lib/python2.7/ -name "*.pth"

also look in ~/.local/lib/python2.7

Print sys.path :

python -c "import sys; print 'n'.join(sys.path)"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment