>>> sys.path[6]
/path/to/django
>>> sys.path.pop(6)
/path/to/django
Then CTRL + D
$ python
>>> sys.path[6]
/path/to/django
O dear…
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
sys.path is populated from the externally maintained PYTHONPATH variable. Change this variable to get a permanent change when you restart python.
On unix (including Macs) when using bash it’s configured most likely like this:
And this statement is most likely hiding in your .profile or .bashrc file.
To do this in Windows you need to do something like
And it’s probably somewhere in the system control panel – under environment.
If you want to see your current setting for PYTHONPATH, go to command (terminal) window and type
echo $PYTHONPATH(unix) orecho %PYTHONPATH%(windows)