[pypy-dev] Using Opencv-python with Pypy

Antonio Cuni anto.cuni at gmail.com
Wed Feb 13 04:54:30 EST 2019


Hello Amy,

On Wed, Feb 13, 2019 at 10:38 AM Amy <ekim94525 at gmail.com> wrote:

> "pypy3 -m pip install opencv-python". However, it give an error: "Could
> not find a version that satisfies the requirement opencv-python (from
> versions: )
> No matching distribution found for opencv-python
>

This happens because opencv decided to release only binary wheels on PyPI,
as you can see here; note that the only files available are *.whl:
https://pypi.org/project/opencv-python/#files

The great advantage of binary wheels is that you don't have to recompile
the package yourself; however, they are tied to a particular combination of
OS/python version: opencv didn't release any binary wheel for PyPy, so pip
cannot find any.

When pip cannot locate a wheel, it tries to download a source package (like
.tar.bz2 or .zip) and compile it on the fly; however, opencv didn't release
any, that's why you get the error.

Your best bet to have opencv on PyPy is to clone the source repo from
github and run setup.py yourself:

$ git clone https://github.com/skvark/opencv-python
$ cd opencv-python
$ pypy3 setup.py install

ciao,
Anto
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20190213/ba92b470/attachment.html>


More information about the pypy-dev mailing list