在Ubuntu上安装Python 3.9的软件包22.04
我正在使用Ubuntu 22.04 LTS,更新后,默认的Python更改为Python 3.10。但是,我目前使用的大多数库仅在3.9上可用。
当我尝试通过
pip安装mypackage
安装软件包时,默认情况下是为python 3.10安装的,v3.9,
python3.9 -m pip install mypackage
我遇到以下错误,
from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'
我必须能够安装这些模块,这一点至关重要对于Python3.9。我试图通过使用Pycharm安装虚拟环境来实现相同的操作,即使在此内,我也会遇到此“ Distutil”错误。我们该如何解决?
I'm using Ubuntu 22.04 LTS, after the update, the default python changed to Python 3.10. However, most of the libraries I'm currently using are only available on 3.9.
when I try to install packages by
pip install mypackage
it is by default installed for python 3.10, V3.9 by
python3.9 -m pip install mypackage
I'm getting the following error,
from distutils.cmd import Command as DistutilsCommand
ModuleNotFoundError: No module named 'distutils.cmd'
It is essential that I should be able to install these modules for Python3.9. I tried to achieve the same by installing a Virtual environment using Pycharm and even inside this VE I'm getting this 'distutil' error. How can we fix this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论