wget https://www.python.org/ftp/python/3.6.7/Python-3.6.7.tgz
tar -zxvf Python-3.6.7.tgz
cd Python-3.6.7/ ./configure prefix=/usr/local/python36 make && make instal
Since I have a python3 version before, I need to replace it. Directly establish a soft link without replacement.
Find python3 location
which python3
Result: /usr/bin/python3
mv /usr/bin/python3 /usr/bin/python3.bak
ln -s /usr/local/python36/bin/python3 /usr/local/bin/
Execute python3 -V or python3 to see the new version (ok)
Solve pip installation problems
Establish a soft link with pip3 (pip in python3)
ln -s /usr/local/python36/bin/pip /usr/local/bin/pip3
Execute pip3 -V and you can see that it points to python3, success!
…end…
Recommended Posts