简体   繁体   English

apt 认为 python-3.7.3 是最新版本

[英]apt thinks python-3.7.3 is the newest version

I am on a "Linux development environment" on ChromeOS, and I need to install a version of Python later than 3.7.7 to use a package (Since my default python version was 3.7.3).我在 ChromeOS 上的“Linux 开发环境”上,我需要安装比 3.7.7 晚的 Python 版本才能使用 package(因为我的默认 python 版本是 3.7.3)。 I have tried我试过了

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install python3

but got但得到了

python3 is already the newest version (3.7.3-1).
python3 set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

When I tried to install a version higher than 3.7, such as 3.9, I got当我尝试安装高于 3.7 的版本时,例如 3.9,我得到了

E: Unable to locate package python3.9
E: Couldn't find any package by glob 'python3.9'
E: Couldn't find any package by regex 'python3.9'

I faced the same exact problem when I used aptitude instead of apt.当我使用 aptitude 而不是 apt 时,我遇到了同样的问题。

I also tried building from source or using ppa(deadsnakes), which seems to be the orthodoxical fix, but neither worked on this device.我还尝试从源代码构建或使用 ppa(deadsnakes),这似乎是正统的修复方法,但都不适用于此设备。 Could you please help me install a new version using apt or any other package manager?您能帮我使用 apt 或任何其他 package 管理器安装新版本吗?

To install python3.9 through apt on debian, you need to upgrade your debian release to bullseye .要在 debian 上通过apt安装 python3.9,您需要将 debian 版本升级到bullseye

You can build python3.9 on Debian Buster following my answer on unix.stackexchange.com您可以按照我在 unix.stackexchange.com 上的回答在 Debian Buster 上构建 python3.9

Just replace the wget command by:只需将wget命令替换为:

wget https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM