首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >OpenCV-CUDA Win10.Python模块在导入中找不到

OpenCV-CUDA Win10.Python模块在导入中找不到
EN

Stack Overflow用户
提问于 2020-04-27 19:46:32
回答 1查看 2.7K关注 0票数 1

因此,我已经用nvidia gpu支持opencv工作了几天,无法让python导入cv2 (导入预编译的opencv-python )。出于沮丧,我刚刚删除了opencv_contrib_master,然后解压缩了CMake,令我惊讶的是,在CMake中出现了一些新的行:

在未分组的条目下:

代码语言:javascript
复制
BUILD_OPENCV_CUDA

在Python 3下:

代码语言:javascript
复制
install path:                C:/ProgramData/Anaconda3/Lib/site-packages/cv2/python-3.7

在OpenCV下:

代码语言:javascript
复制
OPENCV_PYTHON3_VERSION 

太棒了。进步。但现在出现了一个新的敌人:

代码语言:javascript
复制
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
  CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
  directory
Call Stack (most recent call first):
  CMakeLists.txt:967 (include)

上面提到的错误是这里,并声明错误与python配置有关。我认为PY3配置看起来没问题:

代码语言:javascript
复制
PYTHON3_EXECUTABLE                C:/ProgramData/Anaconda3/python.exe
PYTHON3_INCLUDE_DIR               C:/ProgramData/Anaconda3/include
PYTHON3_INCLUDE_DIR2
PYTHON3_LIBRARY                   C:/ProgramData/Anaconda3/libs/python37.lib
PYTHON3_LIBRARY_DEBUG             PYTHON_DEBUG_LIBRARY-NOTFOUND
PYTHON3_NUMPY_INCLUDE_DIRS        C:/ProgramData/Anaconda3/Lib/site-packages/numpy/core/include
PYTHON3_PACKAGE_PATH              C:/ProgramData/Anaconda3/Lib/site-packages

编辑10:在随后的安装中,我看到Cmake从用户/漫游进入numpy库,而不是ProgramData/Anaconda3 3。我不知道这种差异是否会影响建设的成功。

我注意到这些东西不见了(不确定是否重要):

代码语言:javascript
复制
CUDA_nvToolsExt_LIBRARY-NOTFOUND
CUDA_nvcuvenc_LIBRARY-NOTFOUND
CUDA_nvcuvid_LIBRARY-NOTFOUND

还有BLAS/LAPLACK/EIGEN。我仍然不清楚这些是否对python句柄是必要的。

使用GTX 1080,所以我只保留gpu arch版本6.1。省略其他版本将构建时间从2小时15分钟缩短到~30分钟:

代码语言:javascript
复制
Pascal (CUDA 8 and later)
SM60 or SM_60, compute_60 – Quadro GP100, Tesla P100, DGX-1 (Generic Pascal)
SM61 or SM_61, compute_61 – GTX 1080, GTX 1070, GTX

来自CMake的完整构建规范:

代码语言:javascript
复制
Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
Detected processor: AMD64
libjpeg-turbo: VERSION = 2.0.4, BUILD = opencv-4.3.0-dev-libjpeg-turbo
Found OpenJPEG: openjp2 (found version "2.3.0")
found Intel IPP (ICV version): 2020.0.0 [2020.0.0 Gold]
at: C:/Users/---/Downloads/opencv-master/build/3rdparty/ippicv/ippicv_win/icv
found Intel IPP Integration Wrappers sources: 2020.0.0
at: C:/Users/---/Downloads/opencv-master/build/3rdparty/ippicv/ippicv_win/iw
CUDA detected: 10.0
CUDA NVCC target flags: -gencode;arch=compute_61,code=sm_61;-D_FORCE_INLINES
Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
OpenCV Python: during development append to PYTHONPATH: C:/Users/---/Downloads/opencv-master/build/python_loader
Module opencv_alphamat disabled because the following dependencies are not found: Eigen
Caffe: NO
Protobuf: NO
Glog: NO
freetype2: NO
harfbuzz: NO
Module opencv_ovis disabled because OGRE3D was not found
No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
Failed to find installed gflags CMake configuration, searching for gflags build directories exported with CMake.
Failed to find gflags - Failed to find an installed/exported CMake configuration for gflags, will perform search for installed gflags components.
Failed to find gflags - Could not find gflags include directory, set GFLAGS_INCLUDE_DIR to directory containing gflags/gflags.h
Failed to find glog - Could not find glog include directory, set GLOG_INCLUDE_DIR to directory containing glog/logging.h
Module opencv_sfm disabled because the following dependencies are not found: Eigen Glog/Gflags
Tesseract: NO
Allocator metrics storage type: 'long long'
Registering hook 'INIT_MODULE_SOURCES_opencv_dnn': C:/Users/---/Downloads/opencv-master/modules/dnn/cmake/hooks/INIT_MODULE_SOURCES_opencv_dnn.cmake
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:967 (include)

General configuration for OpenCV 4.3.0-dev =====================================
Version control: unknown

Extra modules:
Location (extra): C:/Users/---/Downloads/opencv_contrib-master/modules
Version control (extra): unknown

Platform:
Timestamp: 2020-04-27T18:31:30Z
Host: Windows 10.0.18363 AMD64
CMake: 3.17.1
CMake generator: Visual Studio 15 2017
CMake build tool: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/MSBuild/15.0/Bin/MSBuild.exe
MSVC: 1916

CPU/HW features:
Baseline: SSE SSE2 SSE3
requested: SSE3
Dispatched code generation: SSE4_1 SSE4_2 FP16 AVX AVX2 AVX512_SKX
requested: SSE4_1 SSE4_2 AVX FP16 AVX2 AVX512_SKX
SSE4_1 (16 files): + SSSE3 SSE4_1
SSE4_2 (2 files): + SSSE3 SSE4_1 POPCNT SSE4_2
FP16 (1 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 AVX
AVX (5 files): + SSSE3 SSE4_1 POPCNT SSE4_2 AVX
AVX2 (30 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2
AVX512_SKX (6 files): + SSSE3 SSE4_1 POPCNT SSE4_2 FP16 FMA3 AVX AVX2 AVX_512F AVX512_COMMON AVX512_SKX

C/C++:
Built as dynamic libs?: YES
C++ standard: 11
C++ Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe (ver 19.16.27039.0)
C++ flags (Release): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MD /O2 /Ob2 /DNDEBUG 
C++ flags (Debug): /DWIN32 /D_WINDOWS /W4 /GR /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /EHa /wd4127 /wd4251 /wd4324 /wd4275 /wd4512 /wd4589 /MP /MDd /Zi /Ob0 /Od /RTC1 
C Compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
C flags (Release): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MD /O2 /Ob2 /DNDEBUG 
C flags (Debug): /DWIN32 /D_WINDOWS /W3 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _SCL_SECURE_NO_WARNINGS /Gy /bigobj /Oi /fp:precise /MP /MDd /Zi /Ob0 /Od /RTC1 
Linker flags (Release): /machine:x64 /INCREMENTAL:NO 
Linker flags (Debug): /machine:x64 /debug /INCREMENTAL 
ccache: NO
Precompiled headers: YES
Extra dependencies: cudart_static.lib nppc.lib nppial.lib nppicc.lib nppicom.lib nppidei.lib nppif.lib nppig.lib nppim.lib nppist.lib nppisu.lib nppitc.lib npps.lib cublas.lib cudnn.lib cufft.lib -LIBPATH:C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.0/lib/x64 -LIBPATH:C:/Users/---/Downloads/cudnn-10.0-windows10-x64-v7.6.5.32/cuda/lib/x64
3rdparty dependencies:

OpenCV modules:
To be built: aruco bgsegm bioinspired calib3d ccalib core cudaarithm cudabgsegm cudacodec cudafeatures2d cudafilters cudaimgproc cudalegacy cudaobjdetect cudaoptflow cudastereo cudawarping cudev datasets dnn dnn_objdetect dnn_superres dpm face features2d flann fuzzy gapi hdf hfs highgui img_hash imgcodecs imgproc intensity_transform line_descriptor ml objdetect optflow phase_unwrapping photo plot python3 pythoncuda quality rapid reg rgbd saliency shape stereo stitching structured_light superres surface_matching text tracking ts video videoio videostab xfeatures2d ximgproc xobjdetect xphoto
Disabled: world  (i have this enabled in another attempt- and included it in env path)
Disabled by dependency: -
Unavailable: alphamat cnn_3dobj cvv freetype java js matlab ovis python2 sfm viz
Applications: tests perf_tests apps
Documentation: NO
Non-free algorithms: NO

Windows RT support: NO

GUI: 
Win32 UI: YES
VTK support: NO

Media I/O: 
ZLib: build (ver 1.2.11)
JPEG: build-libjpeg-turbo (ver 2.0.4-62)
WEBP: build (ver encoder: 0x020f)
PNG: build (ver 1.6.37)
TIFF: build (ver 42 - 4.0.10)
JPEG 2000: OpenJPEG (ver 2.3.0)
OpenEXR: build (ver 2.3.0)
HDR: YES
SUNRASTER: YES
PXM: YES
PFM: YES

Video I/O:
DC1394: NO
FFMPEG: YES (prebuilt binaries)
avcodec: YES (58.54.100)
avformat: YES (58.29.100)
avutil: YES (56.31.100)
swscale: YES (5.5.100)
avresample: YES (4.0.0)
GStreamer: NO
DirectShow: YES
Media Foundation: YES
DXVA: YES

Parallel framework: Concurrency

Trace: YES (with Intel ITT)

Other third-party libraries:
Intel IPP: 2020.0.0 Gold [2020.0.0]
at: C:/Users/---/Downloads/opencv-master/build/3rdparty/ippicv/ippicv_win/icv
Intel IPP IW: sources (2020.0.0)
at: C:/Users/---/Downloads/opencv-master/build/3rdparty/ippicv/ippicv_win/iw
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)

NVIDIA CUDA: YES (ver 10.0, CUFFT CUBLAS FAST_MATH)
NVIDIA GPU arch: 61
NVIDIA PTX archs:

cuDNN: YES (ver 7.6.5)

OpenCL: YES (NVD3D11)
Include path: C:/Users/---/Downloads/opencv-master/3rdparty/include/opencl/1.2
Link libraries: Dynamic load

Python 3:
Interpreter: C:/ProgramData/Anaconda3/python.exe (ver 3.7.7)
Libraries: C:/ProgramData/Anaconda3/libs/python37.lib (ver 3.7.7)
numpy: C:/ProgramData/Anaconda3/Lib/site-packages/numpy/core/include (ver 1.15.0)
install path: C:/ProgramData/Anaconda3/Lib/site-packages/cv2/python-3.7

Python (for build): C:/ProgramData/Anaconda3/python.exe

Java: 
ant: NO
JNI: NO
Java wrappers: NO
Java tests: NO

Install to: C:/Users/---/Downloads/opencv-master/build/install
-----------------------------------------------------------------

Configuring done

我是不是遗漏了什么?帮助!

编辑:这些消息现在在Visual生成后弹出

C:\Users---\Downloads\opencv-master\build\modules\highgui\opencv_highgui.vcxproj : edit2:现在在INSTALL :edit2:edit2:无法加载项目文件。根级的数据无效。第260行,位置11. C:\Users---\Downloads\opencv-master\build\modules\highgui\opencv_highgui.vcxproj

edit3:我删除并解压缩了opencv-master以便重新开始,现在在CMake配置中我得到了:

代码语言:javascript
复制
CMake Error at modules/videoio/cmake/detect_ffmpeg.cmake:16 (include):
include could not find load file:

C:/Users/---/Downloads/opencv-master/build/3rdparty/ffmpeg/ffmpeg_version.cmake
Call Stack (most recent call first):
modules/videoio/cmake/init.cmake:3 (include)
modules/videoio/cmake/init.cmake:22 (add_backend)
cmake/OpenCVModule.cmake:312 (include)
cmake/OpenCVModule.cmake:375 (_add_modules_1)
modules/CMakeLists.txt:7 (ocv_glob_modules)

CMake Warning at C:/Users/---/Downloads/opencv-master/cmake/OpenCVModule.cmake:679 (message):
Unexpected include:
C:/Users/---/Downloads/opencv-master/build/downloads/xfeatures2d
(module=opencv_xfeatures2d)
Call Stack (most recent call first):
C:/Users/---/Downloads/opencv-master/cmake/OpenCVModule.cmake:710 (ocv_target_include_modules)
C:/Users/---/Downloads/opencv_contrib-master/modules/xfeatures2d/CMakeLists.txt:17 (ocv_module_include_directories)
CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message):
CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install
directory
Call Stack (most recent call first):
CMakeLists.txt:967 (include)

edit4:删除opencv-主/opencv-控制主和重新运行CMake。当我第一次配置CMake时,我注意到了这个警告。可能与配置错误有关.?

代码语言:javascript
复制
CMake Warning at cmake/OpenCVDetectPython.cmake:81 (message):
  CMake's 'find_host_package(PythonInterp 2.7)' found wrong Python version:

  PYTHON_EXECUTABLE=C:/ProgramData/Anaconda3/python.exe

  PYTHON_VERSION_STRING=3.7.7

  Consider providing the 'PYTHON2_EXECUTABLE' variable via CMake command line
  or environment variables

Call Stack (most recent call first):
  cmake/OpenCVDetectPython.cmake:271 (find_python)
  CMakeLists.txt:598 (include)

编辑5:输出:

代码语言:javascript
复制
CMake Error at modules/python3/cmake_install.cmake:93 (file):
197>  file INSTALL cannot find
197>  "C:/Users/---/Documents/opencv_folder/opencv-master/opencv-master/build/lib/python3/Release/cv2.cp37-win_amd64.pyd":
197>  File exists.
197>Call Stack (most recent call first):
197>  modules/cmake_install.cmake:192 (include)
197>  cmake_install.cmake:120 (include)

来自anaconda CLI:

代码语言:javascript
复制
>>> import cv2
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\lib\cv2\__init__.py", line 96, in <module>
    bootstrap()
  File "C:\ProgramData\Anaconda3\lib\cv2\__init__.py", line 62, in bootstrap
    ], True)
  File "C:\ProgramData\Anaconda3\lib\cv2\__init__.py", line 56, in load_first_config
    raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))
ImportError: OpenCV loader: missing configuration file: ['config-3.7.py', 'config-3.py']. Check OpenCV installation.

编辑6: Visual完成了一个没有错误的构建(againx8)。

代码语言:javascript
复制
>>> import cv2
['', 'C:\\ProgramData\\Anaconda3\\python.exe', 'C:\\ProgramData\\Anaconda3\\python37.zip', 'C:\\ProgramData\\Anaconda3\\DLLs', 'C:\\ProgramData\\Anaconda3\\lib', 'C:\\ProgramData\\Anaconda3', 'C:\\Users\\---\\AppData\\Roaming\\Python\\Python37\\site-packages', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\win32\\lib', 'C:\\ProgramData\\Anaconda3\\lib\\site-packages\\Pythonwin']
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\ProgramData\Anaconda3\lib\cv2\__init__.py", line 96, in <module>
    bootstrap()
  File "C:\ProgramData\Anaconda3\lib\cv2\__init__.py", line 23, in bootstrap
    raise ImportError('ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.')
ImportError: ERROR: recursion is detected during loading of "cv2" binary extensions. Check OpenCV installation.

从“C:\ProgramData\Anaconda3 3\Lib”中删除cv2将创建未找到的模块。从“C:\ProgramData\Anaconda3 3\Lib\Site-Package”中删除cv2将创建dll错误。删除这两个选项会稍微增加我在这个设置上花费的小时数。

我使用启用和禁用cv2world进行编译,并在env路径中设置cv2world.dll并复制到ProgramData\Anaconda\Lib。

编辑7:我所有曾经分区的R环境都被破坏了,我的计算机现在运行得很差(不管文件大小如何,资源管理器在传输文件时都会卡在99%上;显着地增加了启动时间)。现在有一个错误的Python3.6安装。可能是重新安装窗口的时候了。

编辑8:

代码语言:javascript
复制
import cv2
Traceback (most recent call last):

  File "<ipython-input-1-c8ec22b3e787>", line 1, in <module>
    import cv2

  File "C:\Users\Arman\AppData\Roaming\Python\Python37\site-packages\cv2\__init__.py", line 89, in <module>
    bootstrap()

  File "C:\Users\Arman\AppData\Roaming\Python\Python37\site-packages\cv2\__init__.py", line 62, in bootstrap
    ], True)

  File "C:\Users\Arman\AppData\Roaming\Python\Python37\site-packages\cv2\__init__.py", line 56, in load_first_config
    raise ImportError('OpenCV loader: missing configuration file: {}. Check OpenCV installation.'.format(fnames))

ImportError: OpenCV loader: missing configuration file: ['config-3.7.py', 'config-3.py']. Check OpenCV installation.

我尝试过ctrl+cv配置文件,但这将错误更改为递归错误。到目前为止还没有与cuda一起工作的opencv。

编辑9:仍然没有模块被导出到Anaconda库。

可能与此有关: Opencv致命错误LNK1120: 143个未解决的外部

代码语言:javascript
复制
opencv-folder\opencv-master\build\bin\Release\opencv_world430.dll : fatal error LNK1120: 143 unresolved externals
25>Done building project "opencv_world.vcxproj" -- FAILED.
26>------ Build started: Project: opencv_ts, Configuration: Release x64 ------
27>------ Build started: Project: opencv_img_hash, Configuration: Release x64 ------
28>------ Build started: Project: opencv_waldboost_detector, Configuration: Release x64 ------
29>------ Build started: Project: opencv_annotation, Configuration: Release x64 ------
30>------ Build started: Project: opencv_interactive-calibration, Configuration: Release x64 ------
31>------ Build started: Project: opencv_version, Configuration: Release x64 ------
32>------ Build started: Project: opencv_version_win32, Configuration: Release x64 ------
33>------ Build started: Project: opencv_visualisation, Configuration: Release x64 ------

编辑nsomething:从未找到的模块到检测到的递归:

代码语言:javascript
复制
(base) C:\Users\---\Documents\SystemConfig\opencv-folder\opencv-master\build\python_loader>python setup.py build
running build
running build_py

(base) C:\Users\---\Documents\SystemConfig\opencv-folder\opencv-master\build\python_loader>python setup.py install
running install
running bdist_egg
running egg_info
writing opencv.egg-info\PKG-INFO
writing dependency_links to opencv.egg-info\dependency_links.txt
writing requirements to opencv.egg-info\requires.txt
writing top-level names to opencv.egg-info\top_level.txt
reading manifest file 'opencv.egg-info\SOURCES.txt'
writing manifest file 'opencv.egg-info\SOURCES.txt'
installing library code to build\bdist.win-amd64\egg
running install_lib
running build_py
creating build\bdist.win-amd64\egg
creating build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\config-2.7.py -> build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\config-3.7.py -> build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\config.py -> build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\load_config_py2.py -> build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\load_config_py3.py -> build\bdist.win-amd64\egg\cv2
copying build\lib\cv2\__init__.py -> build\bdist.win-amd64\egg\cv2
byte-compiling build\bdist.win-amd64\egg\cv2\config-2.7.py to config-2.7.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\cv2\config-3.7.py to config-3.7.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\cv2\config.py to config.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\cv2\load_config_py2.py to load_config_py2.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\cv2\load_config_py3.py to load_config_py3.cpython-37.pyc
byte-compiling build\bdist.win-amd64\egg\cv2\__init__.py to __init__.cpython-37.pyc
creating build\bdist.win-amd64\egg\EGG-INFO
copying opencv.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO
copying opencv.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying opencv.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying opencv.egg-info\requires.txt -> build\bdist.win-amd64\egg\EGG-INFO
copying opencv.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
cv2.__pycache__.__init__.cpython-37: module references __file__
creating 'dist\opencv-4.3.0-py3.7.egg' and adding 'build\bdist.win-amd64\egg' to it
removing 'build\bdist.win-amd64\egg' (and everything under it)
Processing opencv-4.3.0-py3.7.egg
removing 'a:\programdata\anaconda3\lib\site-packages\opencv-4.3.0-py3.7.egg' (and everything under it)
creating a:\programdata\anaconda3\lib\site-packages\opencv-4.3.0-py3.7.egg
Extracting opencv-4.3.0-py3.7.egg to a:\programdata\anaconda3\lib\site-packages
opencv 4.3.0 is already the active version in easy-install.pth

Installed a:\programdata\anaconda3\lib\site-packages\opencv-4.3.0-py3.7.egg
Processing dependencies for opencv==4.3.0
Searching for numpy==1.18.1
Best match: numpy 1.18.1
Adding numpy 1.18.1 to easy-install.pth file
Installing f2py-script.py script to A:\ProgramData\Anaconda3\Scripts
Installing f2py.exe script to A:\ProgramData\Anaconda3\Scripts

Using a:\programdata\anaconda3\lib\site-packages
Finished processing dependencies for opencv==4.3.0

(base) C:\Users\---\Documents\SystemConfig\opencv-folder\opencv-master\build\python_loader>
EN

回答 1

Stack Overflow用户

发布于 2020-06-25 21:54:24

在OpenCV论坛的从源代码为Windowsx64/Python3.7构建OpenCV。.pyd文件在哪里?线程中,有一条评论(我相信是KTeddy )为我解决了这个问题:

如果您的python解释器不是正式的,您可以尝试官方版本。详细信息:我使用anaconda构建了opencv,但与您的问题一样,cmake中没有BUILD_opencv_python3,因此我无法获得.pyd文件。我遇到一条评论说,anaconda和cmake有兼容性问题。最后,我通过安装正式的python版本来解决这个问题。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/61467225

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档