gpt4 book ai didi

Python3.8 Pip Distutils.cmd Not Found(Python3.8找不到Pip Distutils.cmd)

转载 作者:bug小助手 更新时间:2023-10-22 15:15:39 33 4
gpt4 key购买 nike



I was trying to have a virtualenv set up where it is at python 3.8 while my system is at a more recent version.

我试图在python 3.8上设置一个virtualenv,而我的系统是最新版本。


I have figured out how to create the venv but now when I try to install packages like mediapipe and opencv-python and everything else I get an error saying: ModuleNotFoundError: No module named 'distutils.cmd'. I have tried sudo apt-get install python-distutils and sudo apt-get install python-apt but they are all up to date and do nothing.

我已经想好了如何创建venv,但现在当我尝试安装mediapipe和opencv-python等软件包时,我收到了一个错误:ModuleNotFoundError:没有名为“distutils.cmd”的模块。我尝试过sudo apt-get-install python distutils和sudo apt-get-install python apt,但它们都是最新的,什么都不做。


I am on Debian Bullseye (the raspberry pi one though)

我在Debian Bullseye(不过是树莓派)


Thanks

谢谢


(P.S Sorry if this is a duplicate but nothing else worked)

(附言:很抱歉,如果这是重复的,但其他都不起作用)


更多回答

github.com/pypa/get-pip/issues/124 Found in google.com/…

github.com/pypa/get-pip/issues/124在google.com/…

python-distutils is "old python2" . A python3 package is python3-distutils

python distutils是“老python 2”。python3包是python3distutils

优秀答案推荐

I got the same issue, what resolved it was to install distutils for pythonV.v specfically with

我也遇到了同样的问题,解决的办法是用


sudo apt install pythonV.v-distutils

In mycase V.v == 3.8

在我的情况下,V.V==3.8



Dears,

Dears,


In my case I used the command below to fix my issue:

在我的情况下,我使用下面的命令来解决我的问题:


sudo apt install python3-distutils


sudo apt install python3-distutils
亲测可以

sudo apt安装python3 distutils亲测可以


更多回答

How is this different from @Mohamed-Elaragy's answer from a few months ago? The only difference are some Chinese (Simplified) characters which appear to translate to "Can be tested personally". This appears to simply be validating an existing answer, not providing a new answer?

这与几个月前@Mohamed Elaragy的回答有何不同?唯一的区别是一些中文(简体)字符似乎翻译成“可以亲自测试”。这似乎只是在验证现有答案,而不是提供新答案?

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com