如何在mac中卸载OpenCV

use*_*649 1 macos opencv

我用这种方式安装了OpenCV

#After downloading OpenCV-3.0, in the directory:
echo "#define GTEST_USE_OWN_TR1_TUPLE 1" | cat > temp1
cat modules/ts/include/opencv2/ts/ts_gtest.h > temp2
cat temp1 temp2 > modules/ts/include/opencv2/ts/ts_gtest.h
mkdir build
cd build
cmake .. -Wno-dev
make -j8 && sudo make install
#Update your bash_profile:
~$ echo "export PYTHONPATH=/usr/local/lib/python2.7/site-packages/:$PYTHONPATH" >>
~/.bash_profile
#Close and open the Terminal
#Open python console and try to import cv2 to test if everything works
~$ python import cv2
Run Code Online (Sandbox Code Playgroud)

版本不稳定并且出错我想卸载它以避免在使用brew安装opencv时出现问题,我应该删除文件夹吗?

这就是我做的事情

cd build
 make uninstall
-- Uninstalling "/usr/local/share/OpenCV/3rdparty/lib/libippicv.a"
CMake Error at cmake_uninstall.cmake:20 (MESSAGE):
  Problem when removing "/usr/local/share/OpenCV/3rdparty/lib/libippicv.a"


make[3]: *** [CMakeFiles/uninstall] Error 1
make[2]: *** [CMakeFiles/uninstall.dir/all] Error 2
make[1]: *** [CMakeFiles/uninstall.dir/rule] Error 2
make: *** [uninstall] Error 2
Run Code Online (Sandbox Code Playgroud)

tym*_*mac 7

如果您使用Homebrew进行安装,则可以使用此命令.

brew uninstall opencv3

您不必删除任何目录,例如 /usr/local/Cellar/opencv3


tex*_*ood 5

  1. 转到构建目录并运行 sudo make uninstall

  2. 删除您添加到 ~/.bashrc 的那一行

  3. 删除opencv目录

  • 强调 make uninstall 中的 `sudo`。这可能就是它对你失败的原因 (2认同)