This thread does not fully explain how to fix the problem. I just wrote this for my project wiki page, hopefully a sysop can grab it for the howto page.
Getting access to a system package/library
If your bash term defaults to load your environment exit it with deactivate
Run python, and import the library you want, for example
import PIL
PIL.__file__
'/usr/local/lib/python2.7/site-packages/PIL/PIL/__init__.pyc'
Copy the path (/usr/local/lib/python2.7/site-packages/PIL/
)
Navigate to the virtual env's site-packages folder, for example ~/.virtualenvs/django15/lib/python2.7/site-packages
Use a file editor to create a file named after the desired import with a .pth extension like pil.pth
Put (copy) in the path detected earlier
Save the file.
Restart your virtual environment, for example workon django15
Start Python, and re-try the import such as:
$ workon django15
$ python
Python 2.7.3 (default, Mar 5 2013, 16:37:26)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
import PIL
PIL.__file__
'/usr/local/lib/python2.7/site-packages/PIL/PIL/__init__.pyc'
EDIT by admin - helped out with the formatting - it looks like markdown and codehilite don't like code blocks in lists (tried both ordered and unordered)