How to access PIP -e svn+ specific revision eggs via normal import


PIP lets you install specific revisions from SVN if you use the -e flag.

pip install -E env -e svn+

The problem is that unlike installing without the -e flag, it installs the source files in /YOURENV/src/HERE/, meaning if you’re simply adding your virtualenv’s site-packages to your python path, python won’t find these modules.

I found the answer here

The solution

Use the python site module and addsitedir function which automatically searches *.pth files in the directory and includes those paths.

import site

import django
# success

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s