簡體   English   中英

如何在Mac中卸載OpenCV

[英]How to uninstall OpenCV in mac

我以這種方式安裝了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

該版本不穩定,為了避免在使用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

如果您使用Homebrew進行安裝,則可以使用此命令。

brew uninstall opencv3

您將不必刪除任何目錄,例如/usr/local/Cellar/opencv3

  1. 轉到構建目錄並運行sudo make uninstall

  2. 刪除添加到〜/ .bashrc中的那一行

  3. 刪除opencv目錄

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM