Score:0

Missing libmpdec2 for deadsnakes libpython3.9-stdlib in 22.04 LTS (jammy)

my flag

From deadsnakes at http://ppa.launchpad.net/deadsnakes/ppa/ubuntu the libpython3.9-stdlib depends on libmpdec2, but that is not available on 22.04 LTS (jammy) as far as I can tell, see https://packages.ubuntu.com/search?keywords=libmpdec2. The page displays that libmpdec2 is available for 18.04 LTS and 20.04 LTS. What is to do in this case?

David avatar
cn flag
If you mess with python the OS will be broken. Run a container and a version of Ubuntu that uses the version of Python you need. Or learn about running multi versions of python and not changing the default. Running in the container is the preferred choice.
my flag
My default Python is Python 3.10 and is currently running fine. deadsnake's Python3.7 where libpython3.7-stdlib does not depend on libmpdec2 is also running fine.
David avatar
cn flag
If everything is running fine why the question?
my flag
I would like to have Python3.9 running on my system, - as well as the other versions. Python3.9 will not install. I suppose one fix could be to run 20.04 in a docker container with the python3.x versions installed.
David avatar
cn flag
Which is what I suggested.
Score:1
pl flag

libmpdec2 is superceded by libmpdec3.

You have linked directly to the filesystem of the PPA, and not the PPA itself. This makes me suspect that you're grabbing debs and installing them manually, rather than adding the repo properly and using apt? This could be the cause of your problems. It's absolutely not the way to install packages from PPAs.

I just spun up a 22.04 container and added the PPA correctly via:

sudo add-apt-repository ppa:deadsnakes/ppa

Then installed python3.9 via:

apt install python3.9

It works fine.

root@sunny-shepherd:~# apt install python3.9
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfreetype6
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  bzip2 libpython3.9-minimal libpython3.9-stdlib mailcap mime-support
  python3.9-minimal
Suggested packages:
  bzip2-doc python3.9-venv binfmt-support
The following NEW packages will be installed:
  bzip2 libpython3.9-minimal libpython3.9-stdlib mailcap mime-support
  python3.9 python3.9-minimal
0 upgraded, 7 newly installed, 0 to remove and 3 not upgraded.
Need to get 5306 kB of archives.
After this operation, 19.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] 

All the right packages installed:

Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 bzip2 amd64 1.0.8-5build1 [34.8 kB]
Get:2 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.9-minimal amd64 3.9.16-1+jammy1 [834 kB]
Get:3 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.9-minimal amd64 3.9.16-1+jammy1 [2073 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy/main amd64 mailcap all 3.70+nmu1ubuntu1 [23.8 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy/main amd64 mime-support all 3.66 [3696 B]
Get:6 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 libpython3.9-stdlib amd64 3.9.16-1+jammy1 [1841 kB]
Get:7 https://ppa.launchpadcontent.net/deadsnakes/ppa/ubuntu jammy/main amd64 python3.9 amd64 3.9.16-1+jammy1 [495 kB]
Fetched 5306 kB in 1s (4821 kB/s)
Selecting previously unselected package libpython3.9-minimal:amd64.
(Reading database ... 33796 files and directories currently installed.)
Preparing to unpack .../0-libpython3.9-minimal_3.9.16-1+jammy1_amd64.deb ...
Unpacking libpython3.9-minimal:amd64 (3.9.16-1+jammy1) ...
Selecting previously unselected package python3.9-minimal.
Preparing to unpack .../1-python3.9-minimal_3.9.16-1+jammy1_amd64.deb ...
Unpacking python3.9-minimal (3.9.16-1+jammy1) ...
Selecting previously unselected package bzip2.
Preparing to unpack .../2-bzip2_1.0.8-5build1_amd64.deb ...
Unpacking bzip2 (1.0.8-5build1) ...
Selecting previously unselected package mailcap.
Preparing to unpack .../3-mailcap_3.70+nmu1ubuntu1_all.deb ...
Unpacking mailcap (3.70+nmu1ubuntu1) ...
Selecting previously unselected package mime-support.
Preparing to unpack .../4-mime-support_3.66_all.deb ...
Unpacking mime-support (3.66) ...
Selecting previously unselected package libpython3.9-stdlib:amd64.
Preparing to unpack .../5-libpython3.9-stdlib_3.9.16-1+jammy1_amd64.deb ...
Unpacking libpython3.9-stdlib:amd64 (3.9.16-1+jammy1) ...
Selecting previously unselected package python3.9.
Preparing to unpack .../6-python3.9_3.9.16-1+jammy1_amd64.deb ...
Unpacking python3.9 (3.9.16-1+jammy1) ...
Setting up libpython3.9-minimal:amd64 (3.9.16-1+jammy1) ...
Setting up bzip2 (1.0.8-5build1) ...
Setting up python3.9-minimal (3.9.16-1+jammy1) ...
Setting up mailcap (3.70+nmu1ubuntu1) ...
Setting up mime-support (3.66) ...
Setting up libpython3.9-stdlib:amd64 (3.9.16-1+jammy1) ...
Setting up python3.9 (3.9.16-1+jammy1) ...
Processing triggers for man-db (2.10.2-1) ...
Scanning processes...                                                                                                                                                                         

No services need to be restarted.

No containers need to be restarted.

No user sessions are running outdated binaries.

No VM guests are running outdated hypervisor (qemu) binaries on this host.

Testing:

python3.9 --version
Python 3.9.16
my flag
Looking at your explanation I now see that my entry in /etc/apt/sources.list.d for deadsnakes was for focal (20.04 LTS). I erased that and used your two commands. And all Python versions works now.
pl flag
Excellent! Good to hear
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.