Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

As of Pypy 5.9, OpenCV just works. Instructions for usage in virtual environment:

  • make virtual environment with virtualenv -p /usr/bin/pypy3
  • activate venv
  • clone numpy repository and install with python setup.py build && python setup.py install
  • copy pypy library into virtual environment and change its name, so that opencv finds it with cp /usr/lib/libpypy3-c.so $VIRTUAL_ENV/libpython3.5.3.so
  • clone opencv repository and add these flags to cmake:
    • -D PYTHON_EXECUTABLE=$VIRTUAL_ENV/bin/python3
    • -D PYTHON_LIBRARY=$VIRTUAL_ENV/libpython3.5.3.so
  • make
  • copy cv2 shared object into venv's site-packages cp lib/python3/cv2.pypy3-59-x86_64-linux-gnu.so ~/.pypyenv/site-packages/
  • check installation with python -c "import cv2"