Ubuntu下升级 python3.7.1流程备忘(推荐)
程序员文章站
2022-05-23 19:30:06
下载源码
wget https://www.python.org/ftp/python/3.7.1/python-3.7.1.tgz
解压源码
tar -xvzf p...
下载源码
wget https://www.python.org/ftp/python/3.7.1/python-3.7.1.tgz
解压源码
tar -xvzf python-3.7.1.tgz
进入目录
cd python-3.7.1
配置安装路径
./configure --with-ssl --prefix=/usr/local/python3 安装python3.7.1依赖 #sudo apt-get update #sudo apt-get upgrade #sudo apt-get dist-upgrade sudo apt-get install build-essential python-dev python-setuptools python-pip python-smbus libncursesw5-dev libgdbm-dev libc6-dev zlib1g-dev libsqlite3-dev tk-dev libssl-dev openssl libffi-dev
编译
make
安装
sudo make install
删除软链接
sudo rm -rf /usr/bin/python3 sudo rm -rf /usr/bin/pip3
新建软链接
sudo ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3 sudo ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
检查是否安装成功
python3
总结
以上所述是小编给大家介绍的ubuntu下升级 python3.7.1流程备忘,希望对大家有所帮助
上一篇: mac触摸板单击失灵怎么办 mac触摸板无法点击的解决方法
下一篇: 鲁迅专门为我写的