Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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
1  
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

2 Answers 2

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

 
discard

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.