Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I am just getting into Python, and accidentally deleted my default PYTHONPATH. Can someone please tell me what paths are included in a clean Python install? Thanks!

share|improve this question
up vote 1 down vote accepted

Normal, "clean" installations of Python don't require the use of $PYTHONPATH: the default path embedded in the interpreter already contains all the locations that are needed to find the standard library. You can prove this by running Python directly with a blank value for $PYTHONPATH and asking it to output the path in use:

PYTHONPATH= python -c 'import sys; print(sys.path)'

You will get many directories of output from this.

If you have modules installed in non-standard locations (perhaps for example somewhere in your home directory because you are not root and don't have permission to install modules from PyPI in system directories) then you may indeed need a $PYTHONPATH to tell Python where to find these, but nobody else but yourself knows what these alternate locations are in your case.

share|improve this answer
Thanks! I appreciate the explanation. – Thomas Jan 27 '13 at 20:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .