Install Python Package for User

If you do not have root privilege and want to install a python module, you can try the following approach:

 

python setup.py install --user

This will install packages into subdirectories of site.USER_BASE. To check what is the value of site.USER_BASE, use:

 

import site
print site.USER_BASE

reference: https://docs.python.org/2/install/

 

Update 2018/01/06:

using pip to install a python package:

pip install --user package_name

 

 

Leave a comment

Your email address will not be published. Required fields are marked *