- #CONDA INSTALL OPENCV LIBRARY INSTALL#
- #CONDA INSTALL OPENCV LIBRARY 64 BIT#
- #CONDA INSTALL OPENCV LIBRARY CODE#
When I run configure first time in CMake GUI it finds the default python 3.7. I have several conda environments setup with base one being python 3.7. This is the same problem I mentioned above. I have hovered over all *.dll and it says python37.dll not found in disk. Os.add_dll_directory(r"C:\portable\opencv-compilation\build\3rdparty\ffmpeg")įollowing, #19972 using dependencies utility I see it is looking for python37.dll even though in cmake I stated python 3.9 for all and ran configure. Os.add_dll_directory(r"C:\portable\opencv-compilation\build\bin\Release") Os.add_dll_directory(r"C:\portable\opencv-compilation\build\install\圆4\vc16\bin") Os.add_dll_directory(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\include") Os.add_dll_directory(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\extras\CUPTI\lib64") Os.add_dll_directory(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\libnvvp") Os.add_dll_directory(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0\bin") Os.add_dll_directory(r"C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.0")
#CONDA INSTALL OPENCV LIBRARY CODE#
#CONDA INSTALL OPENCV LIBRARY INSTALL#
Doing an install with Visual Studio CMakeTargets installs like this, This is cv2 folder in under Lib/site-packages/ does not have config for python 3.9 after install. Deleting cmake cache and reconfiguring, using another folder does not help. Pointing the path to another env python37.lib does not help. After clicking configure first time, PYTHON3_LIBRARY is set to C:/Users/computer/miniconda3/libs/python37.lib and does not change anymore. I clicked configure multiple times after changing the path but remains same. Now I am noticing no matter what I set in PYTHON3_LIBRARY it is not showing up in configure output. In this case, I modified CMakeCache.txt to replace all python 3.7 path to correct conda env path. If the cuda part is not used then copying the pyd file to site-packages worked. Ticked WITH_CUDA, OPENCV_DNN_CUDA, set CUDA_ARCH_BIN value based for my GPU. Also set path for opencv-contrib via OPENCV_EXTRA_MODULES_PATH to opencv-contrib source modules folder. I have unticked BUILD_SHARED_LIBS, ticked BUILD_opencv_world and set CMAKE_CONFIGURATION_TYPES to RELEASE only. Then tried visual studio cmake install target that gave ImportError: DLL load failed while importing cv2: The specified module could not be found. Initially got no module named cv2 error after copying cv2.cp39-win_amd64.pyd file to Lib/site-packages. I am trying compile opencv for python 3.9 in conda.
#CONDA INSTALL OPENCV LIBRARY 64 BIT#
Operating System / Platform => Windows 64 Bit.