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.