I want to install Sphinx 1.1.3 for python 2.6. However, I don't have sudo rights. So instead of installing it in the default place, I want to set a different location, using --prefix. Doing the following:
-bash-3.2$ easy_install Sphinx-1.1.3-py2.6.egg --prefix=/homes/ndeklein/python2.6/site-packages/
error: can't create or remove files in install directory
The following error occurred while trying to add or remove files in the
[Errno 13] Permission denied: '/usr/lib/python2.4/site-packages/test-easy-install-18534.write-test'
The installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
python setup.py install --home=/homes/ndeklein/python2.6/site-packages/
This website discusses non-root python installs. It might be useful to you...
To quote a little bit of it:
A user configuration file, ~/.pydistutils.cfg, will override the internal system path for python package installations, redirecting the built libraries (lib), scripts (bin) and data (share) into user owned and specified directories. You must simply tell the python installer where theses directories are located.
The user file, ~/.pydistutils.cfg, has the following lines, using a pretty obvious syntax:
[install] install_scripts = ~/usr/bin install_data = ~/usr/share install_lib = ~/usr/lib/python2.4/site-packages
Of course, whatever directories you specify there should probably exist and you should put them at the front of your PYTHONPATH:
It also looks like more modern python installations (compared to the things in the link) should be able to use the
easy_install --prefix=~/.local ...
There is also:
easy_install --user ...
which will install to a user-specific site directory.