Score:1

Why the system doesn't recognize python3.7 as the python3 installed? (for distutils)

je flag

The ubuntu version is 18.04. The pc is in a environment which can't access internet, but can acess to a limited storage with apt and pip packages. I am trying to install distutils_3.7 on it (I use python3.7 mostly and it takes a lot of effort to install various python libs without internet so not considering upgrading yet).

At first I tried to install with:

apt install python3-distutils

, then it shows the message:

python3-distutils is already the newest version(3.8.10-0ubuntu1~20.04)

So i realized that that is a python3.8 installed on the system (but why ubuntu1~20.04? ). Nevertheless I download a "python3-distutils_3.7.3-1_all.deb" and

dpkg -i python3-distutils_3.7.3-1_all.deb

then it shows the message:

dpkg: dependency problems prevent configuration of python3-distutils:
python3-distutils depends on python3 (<< 3.8); however:
 Version of python3 on system is 3.8.2-0ubuntu2.

So I tried to remove python3.8 via

apt remove python3.8

then in the hope that it would install distutils for my python3.7 now, I tried:

apt install python3-distutils

sadly it shows the message, implying it's going to install both distutils for 3.8 along with python3.8:

The following additional packages will be installed:
  python3 python3-lib2to3 python3.8

So I selected no, and then again i tried to force it to install python3-distutils_3.7 by:

dpkg -i python3-distutils_3.7.3-1_all.deb

Then it shows the message:

dpkg: dependency problems prevent configuration of python3-distutils:
python3-distutils depends on python3 (>= 3.7.1-1~); however:
  Package python3 is not installed.
python3-distutils depends on python3 (<< 3.8); however:
  Package python3 is not installed.

But if i type:python3 -V or python -V

It both shows:

Python 3.7.5

So it seems the python3.7 I have been using is recognized as python3 somehow but not when I tried to install distutils? Is there a method for me to install distutils for my python3.7 in this situation? I don't care if there will be a python3.8 or other version on my system though.

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.