简体   繁体   English

无法在 PyCharm 中导入 opencv

[英]can't import opencv in PyCharm

I've tried to import opencv to Pycharm, but this error pops up:我尝试将 opencv 导入 Pycharm,但弹出此错误:

Collecting cv2收集 cv2

Could not find a version that satisfies the requirement cv2 (from versions: ) No matching distribution found for cv2找不到满足 cv2 要求的版本(来自版本:)找不到 cv2 的匹配发行版

Can you please help me?你能帮我么?

  1. Install opencv with:使用以下命令安装opencv

    pip3 install opencv-python pip3 安装 opencv-python

  2. Make sure you are using the correct interpreter for your project in PyCharm.确保您在 PyCharm 中为您的项目使用正确的解释器。 Go to File\\Settings...\\Project\\Project Interpreter and ensure opencv is listed under the Python interpreter you wish to use.转到File\\Settings...\\Project\\Project Interpreter并确保opencv列在您要使用的 Python 解释器下。

It seems that you are using python 3.8.您似乎正在使用 python 3.8。 Opencv still not applicable for python 3.8. Opencv 仍然不适用于 python 3.8。 In your situation, I recommend you to use python 3.7.在您的情况下,我建议您使用 python 3.7。

Steps:脚步:

1. uninstall the current python.

2. Install python 3.7. 

3. Add it to the path. 

4. When you create a new project make sure to use Python 3.7 as shown below:

Python3.7

Finally, Good luck.最后,祝你好运。 ^_* ^_*

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM