skip to Main Content

I need to specifically install Python 3.10.8 for school, but I can’t seem to get a version higher than 3.10.6

sudo apt-get install python3.10 just result in telling me that python3.10 is already the newest version (3.10.6-1~22.04.2ubuntu1.1)

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
python3.10 is already the newest version (3.10.6-1~22.04.2ubuntu1.1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I already did sudo apt update && sudo apt upgrade and this is what I got:

Failed to start apt-news.service: Unit apt-news.service not found.
Failed to start esm-cache.service: Unit esm-cache.service not found.
Hit:1 http://archive.ubuntu.com/ubuntu jammy InRelease
Hit:2 http://security.ubuntu.com/ubuntu jammy-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu jammy-updates InRelease
Get:4 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [108 kB]
Fetched 108 kB in 1s (110 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

2

Answers


  1. Step 1: sudo apt update

    Step 2: sudo apt install build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libreadline-dev libffi-dev wget

    Step 3: wget https://www.python.org/ftp/python/3.10.8/Python-3.10.8.tgz

    Step 4: tar -xf Python-3.10.8.tgz

    Step 5: cd Python-3.10.8

    Step 6: ./configure --enable-optimizations

    Step 7: make -j $(nproc)

    Step 9: sudo make altinstall

    Verify if python 3.10.8 was installed: python3.10 --version

    Login or Signup to reply.
  2. WSL runs Ubuntu which in turn packages Python. This means that it allows you to install Python versions that Ubuntu packages. They will not package every minor release. sudo apt-get install python3.10 installs the latest version packaged by Ubuntu in WSL.

    More general, I doubt you need such a specific version for school. The features are the same for all python3.10 versions. Unless you are testing for specific issues within Python there is no need for such a specific package.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search