Install Python and It ' s Plugins with NO privileges

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.