我正在嘗試在 Windows 上安裝 opencv-python 但運行命令后pip install opencv-python我不斷收到以下錯誤:ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly。我使用的是 python 版本 3.9.0 和 pip 版本 pip 20.2.4。我已經嘗試升級我的 pip 版本以及 running pip install --upgrade pip setuptools wheel,如在類似線程中找到的那樣,但這些似乎都不能解決問題。運行命令后的完整控制臺輸出:
1 回答

一只甜甜圈
TA貢獻1836條經驗 獲得超5個贊
目前還沒有針對opencv-python. 要從源代碼編譯,您必須安裝構建工具 (Visual Studio 15 2017),如錯誤所示:
scikit-build could not get a working generator for your system. Aborting build.
Building windows wheels for Python 3.9 requires Microsoft Visual Studio 2017.
Get it with "Visual Studio 2017":
https://visualstudio.microsoft.com/vs/
opencv-python
Python 3.9 車輪跟蹤問題:https://github.com/skvark/opencv-python/issues/382
添加回答
舉報
0/150
提交
取消