setting PYTHONPATH to override system wide site-packages

per perfreem at gmail.com
Sat Feb 28 22:30:04 EST 2009


hi all,

i recently installed a new version of a package using python setup.py
install --prefix=/my/homedir on a system where i don't have root
access. the old package still resides in /usr/lib/python2.5/site-
packages/ and i cannot erase it.

i set my python path as follows in ~/.cshrc

setenv PYTHONPATH /path/to/newpackage

but whenever i go to python and import the module, the version in site-
packages is loaded. how can i override this setting and make it so
python loads the version of the package that's in my home dir?

 thanks.





More information about the Python-list mailing list