Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So I created a virutal environment. I also sourced it. Then I installed some packages.

Now, I want to change my PYTHONPATH. How?

share|improve this question
Same way as every other environment variable? – Ignacio Vazquez-Abrams Jan 21 '11 at 9:42
usually, I change the file in /etc/profile. But how do I do that in virtualenv? What do I add ? – Alex Jan 21 '11 at 9:49

You can always change your PYTHONPATH even by request, adding the PYTHONPATH before executing the code or loading your virtual env

PYTHONPATH=blablabla; program execution

You can also change your PYTHONPATH globally in /etc/profile and /etc/bashrc

share|improve this answer

Have a look at this stakoverflow question and answers which give information on how to do this.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.