2

I want to use pypy to gain speed for a project I am doing and I need to use opencv and numpy but when trying to install opencv from pycharm interpreter settings I get the following error:

Collecting opencv-python

DEPRECATION: A future version of pip will drop support for Python 2.7. ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python

how to install opencv to use with pypy?

mark
  • 351
  • 1
  • 3
  • 16

2 Answers2

2

Since it is difficult to build OpenCV, they only upload binary wheels to PyPI (where pip goes to get packages). If you really want to use OpenCV on PyPy, you will have to compile from a github checkout of https://github.com/skvark/opencv-python. If you make any progress on this, please let the maintainer of that repo know, the best would be via a PR that explains how to successfully build. Then they could upload the binary packages to PyPI for PyPY.

mattip
  • 2,360
  • 1
  • 13
  • 13
-1

to install opencv you need to execute this command:

pip install opencv-python

ps : Use this commnad even if you want to use cv2

Hope I've helped you.

  • when trying what you suggested I get ERROR: Could not find a version that satisfies the requirement opencv-python (from versions: none) ERROR: No matching distribution found for opencv-python – mark Apr 27 '19 at 11:59
  • wich OS are you using ? – tommasodeponti Apr 27 '19 at 12:02
  • If you are using mac try intalling it with hombrew, if you are using linux try to install it with sudo apt-get install opencv-python – tommasodeponti Apr 27 '19 at 12:05
  • check you python version. I am using python3. But it should work even in python2 – tommasodeponti Apr 27 '19 at 12:07
  • I am on Ubintu 18.04 and using pypy python implementation which is not the default cpython implementation so I think this why it is working for you but not me.. I think there is a catch – mark Apr 27 '19 at 12:16