ubuntu 18.04 缺少适用于 python3.8 的 python3-distutils

ubuntu 18.04 缺少适用于 python3.8 的 python3-distutils

因此我安装python3.8:

justin@justin-Precision-5550:/usr/lib$ sudo aptitude install python3.8
[sudo] password for justin: 
The following NEW packages will be installed:
  libpython3.8-minimal{a} libpython3.8-stdlib{a} python3.8 
  python3.8-minimal{a} 
0 packages upgraded, 4 newly installed, 0 to remove and 0 not to upgrade.
Need to get 0 B/4,550 kB of archives. After unpacking 18.5 MB will be used.
Do you want to continue? [Y/n/?] y
(Reading database ... 164546 files and directories currently installed.)
Preparing to unpack .../libpython3.8-minimal_3.8.0-3~18.04.1_amd64.deb ...
Unpacking libpython3.8-minimal:amd64 (3.8.0-3~18.04.1) ...
Preparing to unpack .../python3.8-minimal_3.8.0-3~18.04.1_amd64.deb ...
Unpacking python3.8-minimal (3.8.0-3~18.04.1) ...
Selecting previously unselected package libpython3.8-stdlib:amd64.
Preparing to unpack .../libpython3.8-stdlib_3.8.0-3~18.04.1_amd64.deb ...
Unpacking libpython3.8-stdlib:amd64 (3.8.0-3~18.04.1) ...
Selecting previously unselected package python3.8.
Preparing to unpack .../python3.8_3.8.0-3~18.04.1_amd64.deb ...
Unpacking python3.8 (3.8.0-3~18.04.1) ...
Setting up libpython3.8-minimal:amd64 (3.8.0-3~18.04.1) ...
Setting up python3.8-minimal (3.8.0-3~18.04.1) ...
Setting up libpython3.8-stdlib:amd64 (3.8.0-3~18.04.1) ...
Setting up python3.8 (3.8.0-3~18.04.1) ...
Processing triggers for gnome-menus (3.13.3-11ubuntu1.1) ...
Processing triggers for mime-support (3.60ubuntu1) ...
Processing triggers for desktop-file-utils (0.23-1ubuntu3.18.04.2) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...

然后我安装 python3-distutils

justin@justin-Precision-5550:/usr/lib/python3.8/distutils$ sudo aptitude install python3-distutils
The following NEW packages will be installed:
  python3-distutils python3-lib2to3{a} 
0 packages upgraded, 2 newly installed, 0 to remove and 0 not to upgrade.
Need to get 0 B/217 kB of archives. After unpacking 2,118 kB will be used.
Do you want to continue? [Y/n/?] y
Selecting previously unselected package python3-lib2to3.
(Reading database ... 165195 files and directories currently installed.)
Preparing to unpack .../python3-lib2to3_3.6.5-3_all.deb ...
Unpacking python3-lib2to3 (3.6.5-3) ...
Selecting previously unselected package python3-distutils.
Preparing to unpack .../python3-distutils_3.6.5-3_all.deb ...
Unpacking python3-distutils (3.6.5-3) ...
Setting up python3-lib2to3 (3.6.5-3) ...
Setting up python3-distutils (3.6.5-3) ...
                                         

但是当我检查源文件版本时,python3.8 似乎没有安装 distlib?

justin@justin-Precision-5550:/usr/lib/python3.8/distutils$ pwd
/usr/lib/python3.8/distutils
justin@justin-Precision-5550:/usr/lib/python3.8/distutils$ ll
total 40
drwxr-xr-x  3 root root  4096 Aug 13 16:17 ./
drwxr-xr-x 28 root root 12288 Aug 13 16:17 ../
-rw-r--r--  1 root root   236 Feb 26 09:10 __init__.py
drwxr-xr-x  2 root root  4096 Aug 13 16:17 __pycache__/
-rw-r--r--  1 root root 12345 Feb 26 09:10 version.py

当我尝试在 intelliJ 中设置虚拟环境时,这会导致问题:

在此处输入图片描述

我不确定我是否错过了某个步骤,或者哪里出了问题?我尝试搜索 python3.8 的特定 distutils.util,但一无所获

答案1

好吧,我愚蠢地禁用了“推荐更新”

在此处输入图片描述

这意味着我无法获取 python3-disutils 的正确软件包版本。启用此功能并升级到最新版本后,文件现在就在那里。

相关内容