本文于 117 天前发布,最后更新于 92 天前
原文链接:https://www.cnblogs.com/dnfhao/p/13738610.html
详细安装步骤如下:
(1)下载 Python3.7.8
| wget https://www.python.org/ftp/python/3.7.8/Python-3.7.8.tgz |
(2)解压
| tar -xvf Python-3.7.8.tgz |
(3)配置编译
| cd Python-3.7.8 |
| ./configure |
| ./configure |
| make && make install |
| ln -s /usr/local/python3/bin/python3 /usr/bin/python3 |
| ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 |
(4)配置环境变量
将 /usr/local/python3/bin 加入 PATH
| vim /etc/profile |
| |
| export PATH=$PATH:/usr/local/python3/bin |
| |
| source /etc/profile |
(5)验证
| python3 --version |
| 或者 |
| python3 执行交互界面也能看到Python版本。 |