Write the Code. Change the World.

8月 13

直接开始

在这里找到最新的版本 https://www.python.org/ftp/python/,当前 3.9.6 版本。

cd /usr/local/src

wget https://www.python.org/ftp/python/3.9.6/Python-3.9.6.tgz

tar -xzvf Python-3.9.6.tgz

cd Python-3.9.6

mkdir /usr/local/python39

./configure --enable-optimizations --prefix=/usr/local/python39

make && make install

建立软链

ln -s /usr/local/python39/bin/python3.9 /usr/bin/python

ln -s /usr/local/python39/bin/pip3.9 /usr/bin/pip

参考

https://www.cnblogs.com/yangjisen/p/13171063.html