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 tried the two common methods:

import sys



The first one terminates the appendage once interpreter is exited. The second terminates when terminal is closed (despite the fact that people seem to have no problem with permanently appending via the second method).

What am I missing here and how do I resolve this issue?

share|improve this question

You need to put


In a file inside etc/paths.d.

here is a good explanation

EDIT: I think I miss understood, you want to set the PYTHONPATH environment variable. this link show many places that you could put you export statement so it would be permanent.



In ~/.bashrc and it will be set every time bash starts.

share|improve this answer
can you please explain how exactly I can do this in the terminal? I am a beginner. – Paul Sep 8 '12 at 17:56
'vi ~/.bashrc' then type 'i' to start inserting. Type the export line. Hit escape, colen, wq. That will save the file. Restart the terminal. You can check if it worked by typing 'echo $PYTHONPATH' – JoshRagem Sep 9 '12 at 3:17

You must log in to answer this question.

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