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). 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
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.
I also tried building from source or using ppa(deadsnakes), which seems to be the orthodoxical fix, but neither worked on this device. Could you please help me install a new version using apt or any other package manager?
To install python3.9 through apt
on debian, you need to upgrade your debian release to bullseye
.
You can build python3.9 on Debian Buster following my answer on unix.stackexchange.com
Just replace the wget
command by:
wget https://www.python.org/ftp/python/3.9.5/Python-3.9.5.tar.xz