![]() Tbh I don’t use Anaconda much, but I believe you add and remove packages to Anaconda using the conda install command. Ananconda doesn’t store it’s packages in the same location as the system python which you can modify with “apt-get install python-something” or “sudo pip install something”. like below might work, in my opinion: cmake -D WITH_CUDA=ON -D CUDA_ARCH_BIN="5.3" -D CUDA_ARCH_PTX="" -D WITH_GSTREAMER=ON -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=ON -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D OPENCV_EXTRA_MODULES_PATH=/home/nvidia/opencv_contrib-3.4.6/modules -D PYTHON3_EXECUTABLE=/home/nvidia/venv/bin/python PYTHON3_NUMPY_INCLUDE_DIRS=/home/nvidia/venv/lib/python3.6/site-packages/numpy/core/include/ BUILD_opencv_python3=yes -D PYTHON_PACKAGES_PATH=~/home/nvidia/venv/lib/python3.6/site-packages/ -D PYTHON_LIBRARY=/usr/lib/aarch64-linux-gnu/libpython3.6m.so looks like you’re using Anaconda. Though I would do a separate installation with cmake explicitly configured for use of a specific virtual environment. However, since you are using the default system wide installation that is coherent and supports both python2 and python3 with opencv you may go on with it, and otherwise you might manage to get the cv2.so mapping to work on itself. To make cv2 module available within virtual environment you could use symlink probably and create cv2.so file within the virtual environment folder. How to exclude opencv during the time of installation of nano OS with sdkmanager? Hi moderators how to make cv2 module (from the default image) available within the virtualenv environment ? (created with -system-site-packages) option I believe doing so will lose the H/W acceleration capabilities. Type "help", "copyright", "credits" or "license" for more information. This downgraded OpenCV version for me python3 However within a virtualenv ( created via virtualenv -p python3 env -system-site-packages), it was unable to import cv2 from the default image.ĭoing sudo apt-get install python3-opencv made cv2 available within the virtualenv, but it downgraded the openCV version as shown below. I already had OpenCV installed in the default image. ![]() I solved it by: sudo apt-get install python3-opencv
0 Comments
Leave a Reply. |