Skip to content

Install opencv

gr4viton edited this page Jun 25, 2018 · 1 revision

install and compile

you can compile opencv (can take some time)

use the compiled library

  • compilation creates cv2.so library which is to be used with the python
    • you have to link the library into your pve
      • step12
      • or something like this
ln -s /usr/local/lib/python3.5/dist-packages/cv2.so ~/path/to/pve/lib/python3.5/site-packages/cv2.so

in case of the pipenv it the venv dir is in ~/venvs/xxx-hash/

  • save yourself a hassle
    • use function create_cv2_link from brain/script/.bashrc
    • only if you have ag - silversearcher installed

will not work if the cv2.so is named like this

  • refer to the step9
  • look for cv2*.so in /usr/local/lib

try out

import cv2

if you have numpy import error - you should first install the requirements into your pve - using pipenv or whatever

Clone this wiki locally