简体   繁体   中英

can't import opencv in PyCharm

I've tried to import opencv to Pycharm, but this error pops up:

Collecting cv2

Could not find a version that satisfies the requirement cv2 (from versions: ) No matching distribution found for cv2

Can you please help me?

  1. Install opencv with:

    pip3 install opencv-python

  2. Make sure you are using the correct interpreter for your project in PyCharm. Go to File\\Settings...\\Project\\Project Interpreter and ensure opencv is listed under the Python interpreter you wish to use.

It seems that you are using python 3.8. Opencv still not applicable for python 3.8. In your situation, I recommend you to use 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. ^_*

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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