In the past, when using Python, I used to use the global python installed by the root user. now, because the version of Python installed by the root user is too low, and at the same time, I don't have root privileges to upgrade the global Python, so I have to install my own specified Python under the non-root user. so, I reorganized a list of how to install python and its related libraries under a Linux environment using non-root user. Linux environment using non-root user to install python and its related libraries, just in case.
Installing python
python repository /ftp/python/, here I choose version 2.7.5, when installing python, use --prefix to specify the installation path, the command is as follows:
wget /ftp/python/2.7.5/Python-2.7. tar -xzf Python-2.7. cd Python-2.7.5 mkdir -p /home/liudiwei/software/python27 ./configure --prefix="/home/liudiwei/software/python27" make make install
Install setuptools
setuptools is mainly to prepare for the installation of pip, the following is from the download to install all the commands, using the above installation of the specified path of the
python/home/liudiwei/software/python27/bin/python Perform the installation:
wget --no-check-certificate /packages/source/s/setuptools/setuptools-2. tar -xzvf setuptools-2. cd setuptools-2.0 /home/liudiwei/software/python27/bin/python install
Install pip
Use pip to install python related libraries, convenient and simple, here will be python install python replaced with their own installation of the specified path under the python/home/liudiwei/software/python27/bin/python install.
wget --no-check-certificate /packages/41/27/9a8d24e1b55bd8c85e4d022da2922cb206f183e2d18fee4e320c9547e751/pip-8.1.#md5=6b86f11841e89c8241d689956ba99ed7 tar -xzf pip-8.1. cd pip-8.1.1 /home/liudiwei/software/python27/bin/python install
Above this python installation method under non-root privileges is all I have shared with you, I hope to give you a reference, and I hope you will support me more.