Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using pip install on a mac to get my python requirements for a django website.

I got pip from MacPorts

port install pip-2.7

Now the problem is the pip installs the packages in a location which is not in my python sys.path.

I just copied this bogus location


to a location present in my sys.path


Of course this worked ok, but I will use pip in the future so I need a persistent solution.

The question is how can I alter my sys.path to recognize that crap location or how do I tell pip to install dependencies somewhere else ?

share|improve this question
Cross site duplicate, –  Brad Koch Mar 18 '14 at 1:50

1 Answer 1

up vote 1 down vote accepted

Documentation: Set the PYTHONPATH environment variable.

share|improve this answer
I forgot to mention, but I have already tried that a few times. I set and export the $PYTHONPATH (which however I don't really understand why is empty). I open another terminal and and echo $PYTHONPATH prints the change. However, opening a python interpretor and printing sys.path seems unchanged. –  Calin Paul Alexandru May 5 '12 at 12:52
Oh, nevermind. It finally worked. –  Calin Paul Alexandru May 5 '12 at 12:59

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.