Python installation method with non-root permissions, pythonroot

Source: Internet
Author: User

Python installation method with non-root permissions, pythonroot

In the past, we used Global Python installed by the root user. Currently, the python version installed by the root user is too low and you do not have the root permission to upgrade global Python, therefore, you must install your own Python under a non-root user. Therefore, we have reorganized how to use non-root users to install python and related libraries in a Linux environment for emergency purposes.

Install python

Python version library example:

wget https://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgztar -xzf Python-2.7.5.tgzcd Python-2.7.5mkdir -p /home/liudiwei/software/python27 ./configure --prefix="/home/liudiwei/software/python27"makemake install

Install setuptools

Setuptools is mainly used to prepare for pip installation. The following are all the commands downloaded from and installed.

Install python/home/liudiwei/software/python27/bin/python:

wget --no-check-certificate http://pypi.python.org/packages/source/s/setuptools/setuptools-2.0.tar.gztar -xzvf setuptools-2.0.tar.gzcd setuptools-2.0/home/liudiwei/software/python27/bin/python setup.py install

Install pip

It is easy to install python-related libraries using pip. change python in py install to python/home/liudiwei/software/python27/bin/python setup in the specified path. py install.

wget --no-check-certificate https://pypi.python.org/packages/41/27/9a8d24e1b55bd8c85e4d022da2922cb206f183e2d18fee4e320c9547e751/pip-8.1.1.tar.gz#md5=6b86f11841e89c8241d689956ba99ed7tar -xzf pip-8.1.1.tar.gzcd pip-8.1.1/home/liudiwei/software/python27/bin/python setup.py install

The above python installation method without the root permission is all the content that I have shared with you. I hope you can give us a reference and support the help house.

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.