python - 使用 cmake 为 cuda 构建 opencv 时出现错误 MSB8066
问题描述
试图构建 opencv 以与 cuda 一起使用。该过程在这里描述:https ://www.youtube.com/watch?v=
YsmhKar8oOc 简而言之:安装Visual Studio,CUDA 11.02,下载opencv和opencv contrib。使用 cmake 进行配置和生成,然后使用以下命令启动构建:
"C:\Program Files\CMake\bin\cmake.exe" --build "C:\Libraries\build" --target INSTALL --config Release
一段时间后它因此错误而崩溃
...
test_oil_painting.cpp
opencv_test_xphoto.vcxproj -> C:\Libraries\build\bin\Release\opencv_test_xphoto.exe
opencv_version.cpp
opencv_version.vcxproj -> C:\Libraries\build\bin\Release\opencv_version.exe
opencv_version.cpp
opencv_version_win32.vcxproj -> C:\Libraries\build\bin\Release\opencv_version_win32.exe
opencv_visualisation.cpp
opencv_visualisation.vcxproj -> C:\Libraries\build\bin\Release\opencv_visualisation.exe
waldboost_detector.cpp
opencv_waldboost_detector.vcxproj -> C:\Libraries\build\bin\Release\opencv_waldboost_detector.exe
Generate files for Python bindings and documentation
The system cannot find the path specified.
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(241,5):
error MSB8066:
Custom build for
'C:\Libraries\build\CMakeFiles\38d41f3cf6988dab461371ec0a1897f7\pyopencv_generated_enums.h.rule;
C:\Libraries\build\CMakeFiles\b1ecc7062e14bdf9fc394a7073f9148c\gen_opencv_python_source.rule'
exited with code 3. [C:\Libraries\build\modules\python_bindings_generator\gen_opencv_python_source.vcxproj]
这个错误是什么意思?
解决方案
推荐阅读
- keras - 子类化 keras.model 时指定批量大小
- java - sharedpreferences 和 radioButtons 我无法正确保存一个单选按钮状态
- javascript - javascript调用时iframe不更新
- ssl-certificate - iKeyman v7.0 中的主题备用名称
- asp.net-core - ClaimActions.Remove 和 ClaimActions.DeleteClaim 之间的区别
- python - 如何从本地创建全局变量并存储它的先前值?
- amazon-web-services - 如何在 AWS::Serverless::Api 的 AWS SAM 模板中添加请求验证器?
- powershell - 使用 Get-ADForest 或 ([System.DirectoryServices.ActiveDirectory.Forest]::GetCurrentForest() 过滤特定域
- spring-boot - 客户端关闭时如何停止“DiscoveryClient:java.lang.IllegalStateException:正在关闭”。无法使用执行器
- html - 如何让网格布局中的一行溢出顶部而不是底部