Install python3 under liunx, pip

1. Download the liunx installation package

2. Install the dependency library:
yum install openssl-devel bzip2-devel expat-devel gdbm-devel readline-devel sqlite-devel
3. Unzip
tar -zxvf python-3.6.2.tgz
4. Enter the compressed package
cd python-3.6.2 /
5. Create the installation path
mkdir /usr/local/python3
6. Specify the installation path for python
./configure -prefix =/usr/local/python3
7. Compile, install
sudo make &&make install
8. Create a soft link for python3
ln -s /usr/local/python3/bin/python3 /usr/bin/python3
9. Create a soft link for pip
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3


----------------------------------------------------------------------------------------------------------------------------
liunx comes with python2, but no pip module
python2 is installed by default, add pip function for python2
         Install the extension source: yum -y install epel-release
         yum install python2's pip: yum install python-pip

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324403597&siteId=291194637