因此我安装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,但一无所获