Easy install to specific folder on machines without root

I’m using more & more remote machines in which I don’t have admin rights, so usual sudo easy_install isn’t working. But there is simple work around by installing Python packages to non-default directory.
# prepare new Python packages directory
mkdir -p ~/src/python/site-packages

# edit ~/.bashrc so Python knows where to look for packages
export PYTHONPATH=$PYTHONPATH:~/src:~/src/python:~/src/python/site-packages

# install packages
easy_install –install-dir /home/USER/src/python/site-packages PACKAGE_NAME

# ie for pysam installation you should do
easy_install –install-dir /home/lpryszcz/src/python/site-packages cython pyrex pysam


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s