Is my virtual environment (python) causing my PYTHONPATH to break?

linux, python, unix, virtualenv

Solution

That's the point of the virtualenv. It doesn't inherit from the rest of your setup. If you want a PYTHONPATH, you need to explicitly set one.

This djangousers post is probably helpful, you want to use virtualenvwrapper to solve this problem.

More info in this other SO post on a similar problem.

Problem

In my /etc/profile, I set PYTHONPATH as something. But when I `source myvirtual-env` And then do this in python: ``` >>> import sys >>> print sys.path ``` I don't see my paths anywhere.

Original source

Related problems