错误代码
ERROR: Command errored out with exit status 1:
command: ‘C:\Users\31579.conda\envs\python36\python.exe’ ‘C:\Users\31579.conda\envs\python36\lib\site-packages\pip_vendor\pep517\in_process_in_process.py’ bui
ld_wheel ‘C:\Users\31579\AppData\Local\Temp\tmpqvvgjysq’
cwd: C:\Users\31579\AppData\Local\Temp\pip-install-a5xho7b3\opencv-python_c0b22adb6fcc40beae34fb52da121a00
Complete output (332 lines):
– Trying “Ninja (Visual Studio 17 2022 x64 v143)” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Ninja
does not support platform specification, but platform
x64
was specified.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Ninja (Visual Studio 17 2022 x64 v143)” generator – failure
– Trying “Visual Studio 17 2022 x64 v143” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 17 2022
could not find any instance of Visual Studio.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Visual Studio 17 2022 x64 v143” generator – failure
– Trying “Ninja (Visual Studio 16 2019 x64 v142)” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Ninja
does not support platform specification, but platform
x64
was specified.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Ninja (Visual Studio 16 2019 x64 v142)” generator – failure
– Trying “Visual Studio 16 2019 x64 v142” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 16 2019
could not find any instance of Visual Studio.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Visual Studio 16 2019 x64 v142” generator – failure
– Trying “Ninja (Visual Studio 15 2017 x64 v141)” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Ninja
does not support platform specification, but platform
x64
was specified.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Ninja (Visual Studio 15 2017 x64 v141)” generator – failure
– Trying “Visual Studio 15 2017 x64 v141” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
Visual Studio 15 2017
could not find any instance of Visual Studio.
– Configuring incomplete, errors occurred!
See also “C:/Users/31579/AppData/Local/Temp/pip-install-a5xho7b3/opencv-python_c0b22adb6fcc40beae34fb52da121a00/_cmake_test_compile/build/CMakeFiles/CMakeOutput.lo
g”.
– Trying “Visual Studio 15 2017 x64 v141” generator – failure
– Trying “NMake Makefiles (Visual Studio 17 2022 x64 v143)” generator
Not searching for unused variables given on the command line.
CMake Error at CMakeLists.txt:2 (PROJECT):
Generator
ERROR: Failed building wheel for opencv-python
Failed to build opencv-python
ERROR: Could not build wheels for opencv-python which use PEP 517 and cannot be installed directly
关于这个问题我用了网上的n种方法,其实就是下载opencv-python没有问,安装出了问题。我试遍了网上的很多解决方案,还是美能解决我的问题。因为我用的是python3.6,用anaconda进行版本控制。因此我直接在anaconda界面搜索cv下载了opencv4.0.结果项目成功跑起来了。最后我只能emmmmm…,写下了此博客,希望对像我一样试遍网上的方法还是失败的朋友能起到一点帮助。
文章出处登录后可见!