http://lujialong.com/?p=150
in the absence of root privileges, you need to install a Python plugin or upgrade python. The practice is to discard the default Python in the system, compile a new python for the normal user, and then install the module for this new python. When Python installs the module, it will find the corresponding site according to the path of Python.-packages, install the third-party module into this directory. Specific Python-corresponding site-packages is there and can be called: the corresponding Python-C " fromdistutils.sysconfig import get_python_lib; print get_python_lib () "such as Python installed in/home/civilian/python, then the corresponding site-packages can be passed/home/civilian/python/bin/python-c " fromdistutils.sysconfig import get_python_lib; print get_python_lib () "See Site-The packages path is there. With 2.7. 3 For example1Download the source HTTP to the official website://www.python.org/ftp/python/2.7.3/Python-2.7.3.tgz2Installing tar-XZVF python-2.7.3. TGZCD Python-2.7.3./configure–prefix= '/home/civilian/python ' make install3For your own Python installation module, take Django as an example:3.1Download Djangohttps://www.djangoproject.com/m/releases/1.6/Django-1.6.5.tar.gz3.2Unzip Tar-XZVF django-1.6.5. tar.gz3.3installation/home/civilian/python/bin/python2.7setup.py Install Note that python here is just loaded with Python, so Django is installed in/home/civilian/python python, instead of being installed under/usr/bin/python-related python.
Install Python and It ' s Plugins with NO privileges