此问题在此处已有答案:
Pycharm/Python OpenCV and CV2 install error(21个回答)
24天前关闭。
我试图安装cv2和opencv都在pycharm项目。我使用python 3.4
我使用这些命令
pip install opencv
个字符
我收到错误
ERROR: Could not find a version that satisfies the requirement cv2 (from versions: none)
ERROR: No matching distribution found for cv2
型
如何修复它
1条答案
按热度按时间cuxqih211#
OpenCV(cv2)通常使用以下命令安装:
字符串
您可以尝试在PyCharm项目的终端中运行此命令。如果它不起作用,您可能还需要指定与您的Python版本兼容的旧版本OpenCV。例如:
型
您需要将“3.4.6.27“替换为您的python版本。安装后,您可以在Python脚本中导入OpenCV,如下所示:
型
这假设你的Python环境已经在PyCharm中正确设置。