Virtualenv: How to make sure MY environment used all the time

I recently started with virtualenv and was trying to install my own packages like PIL etc.

I wanted to know what do I need to do to make sure once I activate the environment, it remains activated or at least it is used, instead of the system python.

Thanks in advance.

I had a similar problem trying to install Django 1.3 in a virtualenv. I got it to override the loaded modules (modifying the passenger script and PYTHONPATH).

I can’t tell you how to override the system default python (take a look at the Python page at dreamhost wiki), but for the python packages, it’s simple, just add the paths BEFORE the system ones, like this:


That will put the dir in the first place of the list therefore loading it instead of the system default. The good thing is that if you break the package for some reason, it will fallback in the system package.

Thanks a lot. That did help.