问题
I've installed opencv from source using a virtualenv, however I faced some errors and needed to reinstall it. I tried removing all the files with sudo find / -name "opencv" -exec rm {} \;
and checked if the package was removed with pkg-config --modversion opencv
, and it said it could not be found, but when I open the terminal with python3
and enter import cv2
then print(cv2.__version__)
, the terminal returns 4.0.0
. How can I completely remove opencv? I'm on Ubuntu 18.04 LTS.
回答1:
Run this command from your installed environment.
pip uninstall opencv-python
and if you are using Python3 than
pip3 uninstall opencv-python
回答2:
I found out that I hadn't uninstalled in the build folder, problem solved!
来源:https://stackoverflow.com/questions/54826979/opencv-cant-be-found-but-can-be-imported