0

I'm currently trying to get the cv2 library on python so I could play some videos using python. Whenever I try to install cv2 from pycharm I get this error:

Collecting cv2

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

I looked around and read that I should installopencv-python using pip, and I did, but pycharm still does not recognise cv2.

2
  • 1
    It's often the case that multiple Python versions will be installed on a system, so you may have installed it to a different Python installation that what PyCharm is using. Try importing it after launching python at the command line. Also have you tried installing it using the PyCharm package installer? jetbrains.com/help/pycharm/… Commented May 1, 2018 at 1:08
  • @PeterGibson I only have python 3.6 on my system, the error I'm showing is from the pycharm package installer. Commented May 1, 2018 at 1:10

1 Answer 1

3

It works for me here. I just downloaded PyCharm 2018.1, created a new project using Python 3.6 and virtualenv, then navigated to the project settings and installed opencv-python using the PyCharm package manager

Python Interpreter settings

opencv-python package

I then had to restart the python console in PyCharm and I could successfully import cv2.

Sign up to request clarification or add additional context in comments.

1 Comment

I completely removed python and pycharm from my system and reinstalled them and it worked. I don't understand how but thank you!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.