【Debug日记】albumentations包安装失败解决方案

news2024/11/26 0:32:11

直接pip安装pip install albumentations
报错:

  ERROR: Command errored out with exit status 1:
   command: 'D:\anaconda3\envs\pytorch\python.exe' 'D:\anaconda3\envs\pytorch\lib\site-packages\pip\_vendor\pep517\in_process\_in_process.py' build_wheel 'C:\Users\verse\AppData\Local\Temp\tmpv1nq01li'
       cwd: C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80
  Complete output (193 lines):


  --------------------------------------------------------------------------------
  -- Trying 'Ninja (Visual Studio 17 2022 x64 v143)' generator
  --------------------------------
  ---------------------------
  ----------------------
  -----------------
  ------------
  -------
  --
  Not searching for unused variables given on the command line.
  CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  CMake Error at CMakeLists.txt:2 (PROJECT):
    Generator

      Ninja

    does not support platform specification, but platform

      x64

    was specified.


  -- Configuring incomplete, errors occurred!
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- 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 Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 will be removed from a future version of
    CMake.

    Update the VERSION argument <min> value or use a ...<max> suffix to tell
    CMake that the project does not need compatibility with older versions.


  -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22000.
  -- The C compiler identification is MSVC 19.37.32824.0
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Check for working C compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- The CXX compiler identification is MSVC 19.37.32824.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done (3.7s)
  -- Generating done (0.0s)
  -- Build files have been written to: C:/Users/verse/AppData/Local/Temp/pip-install-0r8a7kdz/opencv-python-headless_0424c6bf158f4491a240264e96a43d80/_cmake_test_compile/build
  --
  -------
  ------------
  -----------------
  ----------------------
  ---------------------------
  --------------------------------
  -- Trying 'Visual Studio 17 2022 x64 v143' generator - success
  --------------------------------------------------------------------------------

  Configuring Project
    Working directory:
      C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build
    Command:
      'C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\opencv' -G 'Visual Studio 17 2022' '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.6.13 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' '-DPYTHON_LIBRARY:PATH=D:\anaconda3\envs\pytorch\libs\python36.lib' '-DPython_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPython_ROOT_DIR:PATH=D:\anaconda3\envs\pytorch' '-DPython_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_NumPy_INCLUDE_DIRS:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\numpy\core\include' '-DPython3_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPython3_ROOT_DIR:PATH=D:\anaconda3\envs\pytorch' '-DPython3_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_NumPy_INCLUDE_DIRS:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\numpy\core\include' -T v143 -A x64 '-DPYTHON3_EXECUTABLE=D:\anaconda3\envs\pytorch\python.exe' '-DPYTHON_DEFAULT_EXECUTABLE=D:\anaconda3\envs\pytorch\python.exe' -DPYTHON3_INCLUDE_DIR=D:/anaconda3/envs/pytorch/Include -DPYTHON3_LIBRARY=D:/anaconda3/envs/pytorch/libs/python36.lib -DBUILD_opencv_python3=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_java=OFF -DOPENCV_PYTHON3_INSTALL_PATH=python -DINSTALL_CREATE_DISTRIB=ON -DBUILD_opencv_apps=OFF -DBUILD_opencv_freetype=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -DPYTHON3_LIMITED_API=ON -DBUILD_OPENEXR=ON -DCMAKE_GENERATOR_PLATFORM=x64 -DWITH_WIN32UI=OFF -DWITH_QT=OFF -DWITH_GTK=OFF -DCMAKE_BUILD_TYPE:STRING=Release

  -- Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.22000.
  -- The CXX compiler identification is MSVC 19.37.32824.0
  -- The C compiler identification is MSVC 19.37.32824.0
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - failed
  -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
  -- Check for working CXX compiler: C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - broken
  CMake Error at C:/Users/verse/AppData/Local/Temp/pip-build-env-idsrka90/overlay/Lib/site-packages/cmake/data/share/cmake-3.28/Modules/CMakeTestCXXCompiler.cmake:60 (message):
    The C++ compiler

      "C:/Program Files/Microsoft Visual Studio/2022/Community/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe"

    is not able to compile a simple test program.

    It fails with the following output:

      Change Dir: 'C:/Users/verse/AppData/Local/Temp/pip-install-0r8a7kdz/opencv-python-headless_0424c6bf158f4491a240264e96a43d80/_skbuild/win-amd64-3.6/cmake-build/CMakeFiles/CMakeScratch/TryCompile-enjbb7'

      Run Build Command(s): "C:/Program Files/Microsoft Visual Studio/2022/Community/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_73365.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
      閫傜敤浜\x8e .NET Framework MSBuild 鐗堟湰 17.7.2+d6990bcfa
      鐢熸垚鍚\xaf鍔ㄦ椂闂翠负 2024/5/8 11:38:44銆\x82

      鑺傜偣 1 涓婄殑椤圭洰鈥淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj鈥\x9d(榛樿\xaeょ洰鏍\x87)銆\x82
      PrepareForBuild:
        姝e湪鍒涘缓鐩\xae褰曗\x80渃mTC_73365.dir\Debug\鈥濄\x80\x82
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: 涓\xad闂寸洰褰曟垨杈撳嚭鐩\xae褰曟棤娉曢┗鐣欏湪涓存椂鐩\xae褰曚笅锛屽洜涓鸿繖鍙\xaf鑳戒細瀵艰嚧澧為噺鐢熸垚鍑 虹幇闂\xae棰樸\x80\x82 [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
        姝e湪鍒涘缓鐩\xae褰曗\x80淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\Debug\鈥濄\x80\x82
        姝e湪鍒涘缓鐩\xae褰曗\x80渃mTC_73365.dir\Debug\cmTC_73365.tlog\鈥濄\x80\x82
      InitializeBuildStatus:
        姝e湪鍒涘缓鈥渃mTC_73365.dir\Debug\cmTC_73365.tlog\unsuccessfulbuild鈥濓紝鍥犱负宸叉寚瀹氣\x80淎lwaysCreate鈥濄\x80\x82
        姝e湪瀵光\x80渃mTC_73365.dir\Debug\cmTC_73365.tlog\unsuccessfulbuild鈥濇墽琛\x8c Touch 浠诲姟銆\x82
      ClCompile:
        C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_73365.dir\Debug\\" /Fd"cmTC_73365.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\testCXXCompiler.cxx"
        鐢ㄤ簬 x64 鐨\x84 Microsoft (R) C/C++ 浼樺寲缂栬瘧鍣\xa8 19.37.32824 鐗\x88
        testCXXCompiler.cxx
        鐗堟潈鎵\x80鏈\x89(C) Microsoft Corporation銆備繚鐣欐墍鏈夋潈鍒┿\x80\x82
        cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR /Fo"cmTC_73365.dir\Debug\\" /Fd"cmTC_73365.dir\Debug\vc143.pdb" /external:W3 /Gd /TP /errorReport:queue "C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\testCXXCompiler.cxx"
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003: 鎸囧畾鐨勪换鍔″彲鎵ц\xa1屾枃浠垛\x80淐L.exe鈥濇湭鑳借繍琛屻\x80係ystem.IO.DirectoryNotFoundException: 鏈\xaa 鑳芥壘鍒拌矾寰勨\x80淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.dir\Debug\cmTC_73365.tlog鈥濈 殑涓\x80閮ㄥ垎銆\x82 [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      宸插畬鎴愮敓鎴愰」鐩\xae鈥淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj鈥\x9d(榛樿\xaeょ洰鏍\x87)鐨勬搷浣\x9c - 澶辫触銆\x82

      鐢熸垚澶辫触銆\x82

      鈥淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj鈥\x9d(榛樿\xaeょ洰鏍\x87) (1) ->
      (PrepareForBuild 鐩\xae鏍\x87) ->
        C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: 涓\xad闂寸洰褰曟垨杈撳嚭鐩\xae褰曟棤娉曢┗鐣欏湪涓存椂鐩\xae褰曚笅锛屽洜涓鸿繖鍙\xaf鑳戒細瀵艰嚧澧為噺鐢熸垚 鍑虹幇闂\xae棰樸\x80\x82 [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]


      鈥淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj鈥\x9d(榛樿\xaeょ洰鏍\x87) (1) ->
      (ClCompile 鐩\xae鏍\x87) ->
        C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003: 鎸囧畾鐨勪换鍔″彲鎵ц\xa1屾枃浠垛\x80淐L.exe鈥濇湭鑳借繍琛屻\x80係ystem.IO.DirectoryNotFoundException: 鏈\xaa鑳芥壘鍒拌矾寰勨\x80淐:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.dir\Debug\cmTC_73365.tlog鈥濈殑涓\x80閮ㄥ垎銆\x82 [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]
      C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    鍦\xa8 Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build\CMakeFiles\CMakeScratch\TryCompile-enjbb7\cmTC_73365.vcxproj]

          1 涓\xaa璀﹀憡
          1 涓\xaa閿欒\xaf\xaf

      宸茬敤鏃堕棿 00:00:00.33





    CMake will not be able to correctly generate this project.
  Call Stack (most recent call first):
    CMakeLists.txt:120 (enable_language)


  -- Configuring incomplete, errors occurred!
  Traceback (most recent call last):
    File "C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\skbuild\setuptools_wrap.py", line 639, in setup
      languages=cmake_languages,
    File "C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\skbuild\cmaker.py", line 333, in configure
      "An error occurred while configuring with CMake.\n"

  An error occurred while configuring with CMake.
    Command:
      'C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\opencv' -G 'Visual Studio 17 2022' '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.6.13 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' '-DPYTHON_LIBRARY:PATH=D:\anaconda3\envs\pytorch\libs\python36.lib' '-DPython_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPython_ROOT_DIR:PATH=D:\anaconda3\envs\pytorch' '-DPython_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_NumPy_INCLUDE_DIRS:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\numpy\core\include' '-DPython3_EXECUTABLE:PATH=D:\anaconda3\envs\pytorch\python.exe' '-DPython3_ROOT_DIR:PATH=D:\anaconda3\envs\pytorch' '-DPython3_INCLUDE_DIR:PATH=D:\anaconda3\envs\pytorch\Include' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_NumPy_INCLUDE_DIRS:PATH=C:\Users\verse\AppData\Local\Temp\pip-build-env-idsrka90\overlay\Lib\site-packages\numpy\core\include' -T v143 -A x64 '-DPYTHON3_EXECUTABLE=D:\anaconda3\envs\pytorch\python.exe' '-DPYTHON_DEFAULT_EXECUTABLE=D:\anaconda3\envs\pytorch\python.exe' -DPYTHON3_INCLUDE_DIR=D:/anaconda3/envs/pytorch/Include -DPYTHON3_LIBRARY=D:/anaconda3/envs/pytorch/libs/python36.lib -DBUILD_opencv_python3=ON -DBUILD_opencv_python2=OFF -DBUILD_opencv_java=OFF -DOPENCV_PYTHON3_INSTALL_PATH=python -DINSTALL_CREATE_DISTRIB=ON -DBUILD_opencv_apps=OFF -DBUILD_opencv_freetype=OFF -DBUILD_SHARED_LIBS=OFF -DBUILD_TESTS=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -DPYTHON3_LIMITED_API=ON -DBUILD_OPENEXR=ON -DCMAKE_GENERATOR_PLATFORM=x64 -DWITH_WIN32UI=OFF -DWITH_QT=OFF -DWITH_GTK=OFF -DCMAKE_BUILD_TYPE:STRING=Release
    Source directory:
      C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\opencv
    Working directory:
      C:\Users\verse\AppData\Local\Temp\pip-install-0r8a7kdz\opencv-python-headless_0424c6bf158f4491a240264e96a43d80\_skbuild\win-amd64-3.6\cmake-build
  Please see CMake's output for more information.
  ----------------------------------------
  ERROR: Failed building wheel for opencv-python-headless
Failed to build opencv-python-headless
ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects

关注最后几句话:
在这里插入图片描述

  ERROR: Failed building wheel for opencv-python-headless
Failed to build opencv-python-headless
ERROR: Could not build wheels for opencv-python-headless, which is required to install pyproject.toml-based projects

这个错误提示通常是在尝试安装Python包时出现的。它表明安装过程中遇到了问题,导致无法构建opencv-python-headless这个包的“wheel”(轮子),而轮子是预先编译的二进制包,能够加快安装速度。

既然说没有安装opencv-python-headless,我们就自己手动安装opencv-python-headless
方案一:直接在线安装pip install opencv-python-headless
我直接在线安装的话还是报同样的错

方案二:离线安装
去官网下载对应版本的whl文件
https://pypi.org/project/opencv-python-headless/4.1.1.26/#files
注意我们需要下载正确的版本,我们先确认现在需要哪个版本的opencv-python-headless
我们回到前面的安装信息:
在这里插入图片描述

  • 确定了现在我们需要安装的版本是>=4.1.1的,不要下载低于4.1.1的版本;
  • 其次,确定一下所用的python版本,我的是3.6
  • 最后,我们要确定一下电脑是32位还是64位的

在这里插入图片描述

下载好之后cd到对应的文件夹下,pip install opencv_python_headless-4.1.1.26-cp36-cp36m-win_amd64.whl

在这里插入图片描述
安装结束后再安装原来没有安装上的albumentations:pip install albumentations
就可以成功安装了
在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/1652357.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

2024年营销技术远景图发布:14,106种营销技术产品(同比增长27.8%)

每年五月的第一个星期二&#xff08;美国东部时间&#xff09;&#xff0c;Scott Brinker设定为Martech Day&#xff0c;以此来庆祝营销技术行业和所有有才华的营销技术专家和营销运营专业人士的工作&#xff0c;「为你们在开拓这片荒野所做的一切而欢呼&#xff01;」 同时&a…

24年考研管综199真题PDF共18页

整理了24年考研管综199真题PDF共18页&#xff0c;包含问题求解&#xff0c;条件充分性判断&#xff0c;逻辑推理&#xff0c;写作&#xff0c;几个部分&#xff0c;希望对大家有所帮助 一、问题求解 这部分包含15道小题&#xff0c;每题3分&#xff0c;共45分。题目类型为选择…

SpringBoot使用AOP注解记录操作日志

一、前言 日志&#xff1a;指系统所指定对象的某些操作和其操作结果按时间有序的集合。 操作日志&#xff1a;主要是对某个对象进行新增操作或者修改操作后记录下这个新增或者修改&#xff0c;操作日志要求可读性比较强。比如张三在某个时间下了订单买了某个商品&#xff01; …

CSS选择器(基本+复合+伪类)

目录 CSS选择器 基本选择器 标签选择器&#xff1a;使用标签名作为选择器->选中同名标签设置样式 类选择器&#xff1a;给类选择器定义一个名字.类名&#xff0c;并给标签添加class"类名" id选择器&#xff1a;跟类选择器非常相似&#xff0c;给id选择器定义…

【Qt问题】VS2019 Qt win32项目如何添加x64编译方式

往期回顾&#xff1a; 【Qt问题】Qt常用快捷键汇总-CSDN博客 【Qt问题】Qt Creator 如何链接第三方库-CSDN博客 【Qt问题】Qt 如何带参数启动外部进程-CSDN博客 【Qt问题】VS2019 Qt win32项目如何添加x64编译方式 我们都知道vs2019在编译项目的时候是需要选择编译环境的&…

完全背包问题(零钱交换+组合总和

完全背包问题&#xff08;物体可以无限使用&#xff0c;正序遍历即可 For循环顺序也能交换&#xff0c;装满的话 零钱交换 完全背包问题&#xff0c;如果求装满背包有几种方法&#xff0c;都用累加。 遍历顺序影响到输出的结果是组合数还是排列数 先物品再背包是组合数&…

宏集PLC+HMI触控一体机助力构建物料自动分拣系统

一、应用背景 随着工业生产和物流领域的快速发展&#xff0c;对仓储、分拣和配送效率以及准确性的需求不断提高。传统的人工分拣已无法满足市场需求&#xff0c;为了实现智能物流&#xff0c;对高性能的物料输送分拣设备需求更为迫切。 二、物料分拣系统介绍 智能化物料分拣系…

【强训笔记】day15

NO.1 代码实现&#xff1a; #include<iostream> #include<cmath>using namespace std; typedef long long ll;int main() {ll x;cin>>x;ll asqrt(x);ll x1a*a,x2(a1)*(a1);if(x-x1<x2-x) cout<<x1<<endl;else cout<<x2<<endl;r…

网络安全的未来:挑战、策略与创新

引言&#xff1a; 在数字化时代&#xff0c;网络安全已成为个人和企业不可忽视的议题。随着网络攻击的日益频繁和复杂化&#xff0c;如何有效保护数据和隐私成为了一个全球性的挑战。 一、网络安全的现状与挑战 网络安全面临的挑战多种多样&#xff0c;包括但不限于恶意软件、…

C语言 main( ) 函数的指针数组形参是怎么回事?

一、问题 在使⽤⼀些开发⼯具⽣成C语⾔⽂件时&#xff0c;主函数 mian( ) 中会有参数&#xff0c;这个参数到底是怎么回事⼉呢&#xff1f; 二、解答 mian( ) 称为主函数&#xff0c;是所有程序运⾏的⼊口。 mian( ) 函数是由系统调⽤的&#xff0c;当处于操作命令状态下&…

47. UE5 RPG 实现角色死亡效果

在上一篇文章中&#xff0c;我们实现了敌人受到攻击后会播放受击动画&#xff0c;并且还给角色设置了受击标签。并在角色受击时&#xff0c;在角色身上挂上受击标签&#xff0c;在c里&#xff0c;如果挂载了此标签&#xff0c;速度将降为0 。 受击有了&#xff0c;接下来我们将…

Linux中每当执行‘mount’命令(或其他命令)时,自动激活执行脚本:输入密码,才可以执行mount

要实现这个功能&#xff0c;可以通过创建一个自定义的mount命令的包装器&#xff08;wrapper&#xff09;来完成。这个包装器脚本会首先提示用户输入密码&#xff0c;如果密码正确&#xff0c;则执行实际的mount命令。以下是创建这样一个包装器的步骤&#xff1a; 创建一个名为…

IP 地址追踪工具促进有效的 IP 管理

网络 IP 地址空间的结构、扫描和管理方式因组织的规模和网络需求而异&#xff0c;网络越大&#xff0c;需要管理的 IP 就越多&#xff0c;IP 地址层次结构就越复杂。因此&#xff0c;如果没有 IP 地址管理&#xff08;IPAM&#xff09;解决方案&#xff0c;IP 资源过度使用和地…

超越传统游戏:生成式人工智能对游戏的变革性影响

人工智能&#xff08;AI&#xff09;在游戏中的应用 游戏产业是一个充满活力、不断发展的领域&#xff0c;人工智能&#xff08;AI&#xff09;的融入对其产生了重大影响。这一技术进步彻底改变了游戏的开发、玩法和体验方式。本文分析的重点是传统人工智能和生成式人工智能在游…

【影片欣赏】【指环王】【魔戒:双塔奇谋 The Lord of the Rings: The Two Towers】

2003年发行&#xff0c;Special Extended DVD Edition Part One 1. The Foundations of Stone 2. Elven Rope 3. The Taming of Smeagol 4. The Uruk-hai 5. The Three Hunters 6. The Burning of the Westfold 7. Massacre at the Fords of Isen 8. The Banishment of Eomer …

Jmeter 中 CSV 如何参数化测试数据并实现自动断言

当我们使用Jmeter工具进行接口测试&#xff0c;可利用CSV Data Set Config配置元件&#xff0c;对测试数据进行参数化&#xff0c;循环读取csv文档中每一行测试用例数据&#xff0c;来实现接口自动化。此种情况下&#xff0c;很多测试工程师只会人工地查看响应结果来判断用例是…

Linux各目录及每个目录的详细介绍

目录 /bin 存放二进制可执行文件(ls,cat,mkdir等)&#xff0c;常用命令一般都在这里。 /etc 存放系统管理和配置文件 /home 存放所有用户文件的根目录&#xff0c;是用户主目录的基点&#xff0c;比如用户user的主目录就是/home/user&#xff0c;可以用~user表示 /us…

zlib编译后静态库调用时遇到的无法解析的外部符号问题

编译zlib的静态库后引用到项目中使用&#xff0c;发现报下面的链接错误&#xff1a; error LNK2019: 无法解析的外部符号 _zlibVersion error LNK2019: 无法解析的外部符号 _deflateEnd error LNK2019: 无法解析的外部符号 _deflate error LNK2019: 无法解析的外部符号 _deflat…

『51单片机』AT24C02[IIC总线]

存储器的介绍 ⒈ROM的功能⇢ROM的数据在程序运行的时候是不容改变的&#xff0c;除非你再次烧写程序&#xff0c;他就会改变&#xff0c;就像我们的书本&#xff0c;印上去就改不了了&#xff0c;除非再次印刷&#xff0c;这个就是ROM的原理。 注→在后面发展的ROM是可以可写可…

【系统架构师】-UML-用例图(Use Case)

1、概述 用于表示系统功能需求&#xff0c;以及应用程序与用户或者与其他应用程序之间的交互关系。 2、组成 参与者&#xff08;Actors&#xff09;&#xff1a;与系统交互的用户或其他系统。用一个人形图标表示。用例&#xff08;Use Cases&#xff09;&#xff1a;系统需要…