How to install python packages without root privileges?

You don’t need root privileges to install packages in your home directory. You can do that with a command such as

pip install --user numpy

or from source

python setup.py install --user

See https://stackoverflow.com/a/7143496/284795


The first alternative is much more convenient, so if the server doesn’t have pip or easy_install, you should politely ask the admins to add it, explaining the benefit to them (they won’t be bothered anymore by requests for individual packages).

Leave a Comment