我最近从Ubuntu 18.04
升级到有19.04
的python 3.7
。但我使用Python 3.6
处理许多项目。
现在,当我尝试在PyCharm中使用virtualenv
创建Python 36
时,它会引发:
ModuleNotFoundError: No module named 'distutils.core'
我无法弄清楚该怎么做。
我试图安装distutils:
milano@milano-PC:~$ sudo apt-get install python3-distutils
Reading package lists... Done
Building dependency tree
Reading state information... Done
python3-distutils is already the newest version (3.7.3-1ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
但是你可以看到我有最新的版本。
你知道该怎么办吗?
Python基本解释器确实需要一些附加模块。这些默认情况下不安装18.04。要解决丢失的包问题,请运行以下命令并在之后重新启动pycharm
sudo apt-get install python3-distutils