Add to python path mac os x
I thought import sys sys.path.append("/home/me/mydir") is appending a dir to my pythonpath if I print sys.path my dir is in there. Then I open a new command and it is not there anymore. But somehow Python cant import modules I saved in that dir. What Am I doing wrong? I read .profile or .bash_profile will do the trick. Do I have to add: PATH="/Me//Documents/mydir:$PYTHONPATH" export PATH To make it work? Matthew Flaschen Modifications to sys.path only apply for the life of that Python interpreter. If you want to do it permanently you need to modify the PYTHONPATH environment variable: