How to Upgrade OpenCV to Specific Version Using Pip?


February 2019


11 time


I want to install OpenCV 3.4.0 on Ubuntu 16.04. I tried to build from source following tutorial on internet but run to this problem:

ImportError: /home/ivan/.virtualenvs/cv/lib/python3.5/site-packages/ undefined symbol: _ZTIN2cv3dnn19experimental_dnn_v35LayerE

So I decided to just upgrade OpenCV using pip following solution on github

pip3 install --upgrade opencv-python

It works fine, cv2 successfully imported. But it directly upgraded to opencv 4.0.0 . Is there any way to upgrade opencv to specific version (ex: 3.4.0) using pip?

1 answers


Все, что вам нужно сделать, это поставить версию в команде следующим образом

pip3 install --upgrade opencv-python==3.4.0