Fabricio Yacques
Fabricio Yacques

Reputation: 79

Using OpenCV with PyPy

I am trying to run a python script using OpenCV with PyPy, but all the documentation that I found didn't work.

The installation of PyPy went well, but when I try to run the script it says that it can't find OpenCV modules like 'cv2' for example, despite having cloned opencv for pypy directly from a github repository.

I would need to know how to do it exactly.

Upvotes: 4

Views: 3504

Answers (2)

mattip
mattip

Reputation: 2563

which repo did you clone? The cononical repo for building opencv for python is https://github.com/skvark/opencv-python, but this uses NumPy and will be slow for PyPy.

There is also https://github.com/Magnetic/opencv-cffi which is an incomplete wrapper for a older version of OpenCV. It has an example how to use it https://github.com/Magnetic/opencv-cffi/blob/master/examples/contrast_and_brightness.py

Upvotes: 0

HLupo
HLupo

Reputation: 317

pip install opencv-python worked well for me on python 2.7, I can import and use cv2.

Upvotes: 1

Related Questions