opencv-uninstall-reinstall(add opencv_contrib)

original opencv is 3.3.0 cause the jetpack4.2.1 auto install.

Now i want to used the GPU part of opencv ,so download the package opencv4.2.0 and opencv4.2.0_contrib  .

Uninstall part

  1. sudo apt-get purge libopencv*

  2. sudo apt autoremove

  3. sudo apt-get update

note:didn't choose the  method of find,cause it may not safe for me. 

compile part 

lack some of the file in the "opencv-4.2.0/opencv_contrib-4.2.0/modules/xfeatures2d/src"

find in here for free.

https://pan.baidu.com/s/1SmRMg_aydPYOJ1jKNjGZPw

code:z7dp 

If you got VPN,then find the website from the "CMakeDownloadLog.txt"

my_cmake.sh (decide what to compile put inside build file)

#!/bin/bash
cmake \
    -D CMAKE_BUILD_TYPE=Release \
    -D CUDA_GENERATION=Pascal \
    -D CMAKE_INSTALL_PREFIX=/usr/local \
    -D BUILD_opencv_python2=ON \
    -D BUILD_opencv_python3=ON\
    -D WITH_GSTREAMER=ON \
    -D WITH_CUDA=ON \
    -D WITH_CUDNN=ON \
    -D CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-10.0 \
    -D CUDA_ARCH_BIN=6.2 \
    -D CUDA_ARCH_PTX="" \
    -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib-4.2.0/modules/ \
    -D WITH_LIBV4L=ON \
    -D BUILD_TESTS=OFF \
    -D BUILD_PERF_TESTS=OFF \
    -D BUILD_EXAMPLES=OFF \
    ../
install part

sudo make install

 

 

ERROR: Exception: Traceback (most recent call last): File "c:\users\administrator\appdata\local\programs\python\python38\lib\shutil.py", line 788, in move os.rename(src, real_dst) OSError: [WinError 17] 系统无法将文件移到不同的磁盘驱动器。: 'c:\\users\\administrator\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\cv2\\cv2.pyd' -> 'D:\\Personal\\Temp\\pip-uninstall-1dw77u1o\\cv2.pyd' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 106, in _run_wrapper status = _inner_run() File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\cli\base_command.py", line 97, in _inner_run return self.run(options, args) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\commands\uninstall.py", line 106, in run uninstall_pathset = req.uninstall( File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\req\req_install.py", line 723, in uninstall uninstalled_pathset.remove(auto_confirm, verbose) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\req\req_uninstall.py", line 370, in remove moved.stash(path) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\req\req_uninstall.py", line 261, in stash renames(path, new_path) File "c:\users\administrator\appdata\local\programs\python\python38\lib\site-packages\pip\_internal\utils\misc.py", line 350, in renames shutil.move(old, new) File "c:\users\administrator\appdata\local\programs\python\python38\lib\shutil.py", line 803, in move os.unlink(src) PermissionError: [WinError 5] 拒绝访问。: 'c:\\users\\administrator\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\cv2\\cv2.pyd'
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值