Ubuntu安装Python3.9

本文共有688个字,关键词:

问题: ubuntu下如何安装python3.9

解决: 使用安装包安装

方法:

sudo apt install -y wget build-essential libreadline-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
wget https://www.python.org/ftp/python/3.9.0/Python-3.9.0b4.tgz
tar -zxvf Python-3.9.0b4.tgz
# 编译参数设置
./configure --prefix=/usr/local/python3
# 编译
make
# 安装
sudo make install

sudo ln -s /usr/local/python3/bin/python3.9 /usr/bin/python3.9
sudo ln -s /usr/local/python3/bin/pip3.9 /usr/bin/pip3.9

参考:

https://blog.csdn.net/weixin_42482896/article/details/107460100
版权声明:本文为作者原创,如需转载须联系作者本人同意,未经作者本人同意不得擅自转载。
添加新评论
暂无评论