我是Python的初学者,使用Python 3.6.5版。从github下载源代码,我无法使用pip install <<module name>>
下载/安装模块
在运行最初的.py
脚本时,我收到此错误:
ModuleNotFoundError: No module named 'cvutils.cvdetector'
在进一步分析中,我在其中一个内部模块中找到了代码from cvutils.cvdetector import CvDetector
。在命令提示符上的pip install cvutils.cvdetector
上,我得到的错误是
Could not find a version that satisfies the requirement cvutils.cvdetector
(from versions: )
No matching distribution found for cvutils.cvdetector
cvutils
已经安装在..\AppData\Local\Programs\Python\Python36-32\Lib\site-packages\cvutils
。我必须添加任何其他依赖项才能使用吗?
前几天我遇到了类似的问题。
首先,您可以尝试运行python -m pip install <module_name>
。有时取决于您的环境设置,只运行pip install <module_name>
不起作用。
如果这不能解决您的问题,您可以卸载Python并手动删除安装时创建的所有相关目录(我的位于C:\Users\username\AppData\Local\Programs\Python)
。我这样做了,重新安装后,我不再有错误。