這個問題在這里已經有了答案: 錯誤:找不到滿足要求 cv2 的版本(來自版本:無)錯誤:找不到 cv2 的匹配分布 (1 個答案) 14 小時前關閉。
當我嘗試使用 python pip 安裝 OpenCV 時,它顯示了這一點:
Remainder of file ignored
Requirement already satisfied: pip in /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages (20.3.4)
Collecting pip
Using cached pip-21.3.1-py3-********* (1.7 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.3.4
Uninstalling pip-20.3.4:
Successfully uninstalled pip-20.3.4
Successfully installed pip-21.3.1
*Mine*-MacBook-Air ~ % pip install cv2
Error processing line 1 of /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/********:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<frozen **********bootstrap>", line 562, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
Error processing line 1 of /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/*******************:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site.py", line 169, in addpackage
exec(line)
File "<string>", line 1, in <module>
File "<********.bootsrap>", line 562, in module_from_spec
AttributeError: 'NoneType' object has no attribute 'loader'
Remainder of file ignored
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
我不知道為什么即使我嘗試重新安裝 python,也沒有任何反應!
我在 Macbook Air 上“上面給出了版本”,即使使用 python 10.1(最新的當前版本)也沒有任何反應!
我的 pip 版本也是最新的(可以在上面的命令中找到)。
此外,某些軟體包不會出現此問題,僅會出現一些軟體包,例如 open cv (cv2)。另外,我用來安裝它的命令是“PIP install cv2”。請不要推薦我升級我的 python 版本,因為我已經嘗試過了,它顯示了同樣的東西!
uj5u.com熱心網友回復:
您嘗試在 Mac 上安裝的方式和位置?
嘗試pip install opencv-python代替pip install cv2
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/409417.html
標籤:
上一篇:MacCatalystUITitleBar覆寫了UI——如何解決?
下一篇:zsh:權限被拒絕:flake8
