On 15/2/19 2:22 am, Amy wrote:
Hi,

 I found a problem while using cv2. In my code, I already imported cv2 and installed pip install opencv-python already, however, it gives following error.

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

When I try with python, it is working well, however, when I try with pypy3, it is not importing cv even though there is a opencv-python in the site-packages.

Please help me with this error! I have been working on this error for a week.


Hi Amy. Thanks for trying PyPy. Since PyPy is an alternative implementation of the python runtime, it needs a spearate installation of all the python packages, it cannot share with the usual python (formally known as cpython since it is written in C). If you run `pypy -c "import sys; print(sys.path)"` you will see where it keeps its site-packages, which is different than `python3 -c "import sys; print(sys.path)"`.


As for opencv, it does not provide binary builds for pypy on pypi, you will have to build from source. You can read more about it here https://pypi.org/project/opencv-python/


Matti

_______________________________________________
pypy-dev mailing list
pypy-dev@python.org
https://mail.python.org/mailman/listinfo/pypy-dev

Reply via email to