由于 Ubuntu 21.10 和通常的版本不再支持 python 3.6deadsnakes
方法也行不通。它给出以下错误。
E: The repository 'http://ppa.launchpad.net/deadsnakes/ppa/ubuntu impish Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
Deadsnake 存储库中没有可用的版本。
我能够按照此处的步骤进行安装:https://tecadmin.net/install-python-3-6-ubuntu-linuxmint/ https://tecadmin.net/install-python-3-6-ubuntu-linuxmint/
第 1 步 – 先决条件
sudo apt-get install build-essential checkinstall
sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev
libreadline-gplv2-dev
对我来说失败了,在这种情况下删除它并安装其余的。
第 2 步 – 下载 Python 3.6
cd /usr/src
sudo wget https://www.python.org/ftp/python/3.6.10/Python-3.6.10.tgz
sudo tar xzf Python-3.6.10.tgz
第 3 步 – 编译 Python 源代码
cd Python-3.6.10
sudo ./configure --enable-optimizations
sudo make altinstall
make altinstall 用于防止替换默认的 python 二进制文件 /usr/bin/python。
步骤 4 – 检查 Python 版本
python3.6 -V
就是这样。您的机器上已经安装了 python3.6。
如果您无法从那里安装。这可能有帮助:https://askubuntu.com/questions/866901/what-can-i-do-if-a-repository-ppa-does-not-have-a-release-file/1302382#1302382 https://askubuntu.com/questions/866901/what-can-i-do-if-a-repository-ppa-does-not-have-a-release-file/1302382#1302382
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)