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

直接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
就可以成功安装了
在这里插入图片描述

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

如若内容造成侵权/违法违规/事实不符,请联系我们进行投诉反馈qq邮箱809451989@qq.com,一经查实,立即删除!

相关文章

【编程题-错题集】连续子数组最大和(动态规划 - 线性 dp)

牛客对应题目链接&#xff1a;连续子数组最大和_牛客题霸_牛客网 (nowcoder.com) 一、分析题目 简单线性 dp。 1、状态表示 dp[i] 表示&#xff1a;以 i 位置为结尾的所有子数组中&#xff0c;最大和是多少。 2、状态转移方程 dp[i] max(dp[i - 1] arr[i], arr[i]) 3、返回…

Sarcasm detection论文解析 |使用 BERT 进行中间任务迁移学习的刺检测

论文地址 论文地址&#xff1a;https://www.mdpi.com/2227-7390/10/5/844#/ github&#xff1a;edosavini/TransferBertSarcasm (github.com) 论文首页 笔记框架 使用 BERT 进行中间任务迁移学习的讽刺检测 &#x1f4c5;出版年份:2022 &#x1f4d6;出版期刊:Mathematics &…

[C/C++] -- 装饰器模式

装饰器模式是一种结构型设计模式&#xff0c;它允许在不改变原始对象的基础上动态地扩展其功能。这种模式通过将对象包装在装饰器类的对象中来实现&#xff0c;每个装饰器对象都包含一个原始对象&#xff0c;并可以在调用原始对象的方法之前或之后执行一些额外的操作。 装饰器…

炫龙电脑数据恢复方法有哪些?4个常用方法大放送

随着科技的不断发展&#xff0c;电脑已成为我们日常生活中不可或缺的一部分。然而&#xff0c;无论是由于操作失误、病毒感染、系统崩溃还是硬件故障&#xff0c;数据丢失都可能是每个电脑用户都可能面临的问题。对于使用炫龙电脑的用户来说&#xff0c;了解并掌握一些基本的数…

webassembly入门详解(C++)

一、环境配置 环境说明,操作系统为window操作系统。 1.1 下载和安装python 下载 需要python版本至少3.6版本 python下载地址:https://www.python.org/getit/ 安装 检测安装结果 win+R组合键->cmd->输入python->回车 1.2 下载和安装emsdk 下载 下载地址:https://gi…

这个Python库Streamlit,5分钟内搭建可视化WEB应用

在数据科学的世界里&#xff0c;将分析结果快速、直观地呈现给非技术背景的决策者&#xff0c;是一项重要的技能。而Streamlit&#xff0c;这个开源的Python库&#xff0c;正是为此而生。它允许数据科学家和工程师通过少量的代码&#xff0c;快速创建和分享数据应用。今天&…

OpenAI推出DALL·E 3识别器、媒体管理器

5月8日&#xff0c;OpenAI在官网宣布&#xff0c;将推出面向其文生图模型DALLE 3 的内容识别器&#xff0c;以及一个媒体管理器。 随着ChatGPT、DALLE 3等生成式AI产品被大量应用在实际业务中&#xff0c;人们越来越难分辨AI和人类创建内容的区别&#xff0c;这个识别器可以帮…

【Git】Git学习-15:分支简介和基本操作

学习视频链接&#xff1a;【GeekHour】一小时Git教程_哔哩哔哩_bilibili​编辑https://www.bilibili.com/video/BV1HM411377j/?vd_source95dda35ac10d1ae6785cc7006f365780https://www.bilibili.com/video/BV1HM411377j/?vd_source95dda35ac10d1ae6785cc7006f365780 git bran…

pycharm code行太长显示波浪线取消

实际操作如下&#xff1a;个人比较合适的位置为160,180时有点多 效果&#xff1a;

Agent AI智能体:塑造未来社会的智慧力量

&#x1f525; 个人主页&#xff1a;空白诗 文章目录 &#x1f916; Agent AI智能体&#xff1a;塑造未来社会的智慧力量&#x1f3af; 引言&#x1f331; 智能体的未来角色预览&#x1f4bc; 行业革新者&#x1f31f; 创意合作者&#x1f6e1;️ 公共安全与环保&#x1f680; …

武汉星起航:亚马逊欧洲站:丰富商品与卓越服务铸就高客单价典范

亚马逊&#xff0c;作为全球最大的电商平台之一&#xff0c;其欧洲站在全球电商市场中占据着举足轻重的地位。其中&#xff0c;亚马逊欧洲站的人均客单价更是高居世界前列&#xff0c;这背后究竟隐藏着哪些原因呢&#xff1f; 首先&#xff0c;亚马逊具有丰富且高质量的商品品…

工业镜头助力锂电制造业精准检测

在电动汽车、电动轻型车、电动工具、消费电子和新型储能等行业大发展的背景下&#xff0c;锂电池综合优势与下游领域对电池大容量、高功率、使用寿命和环境保护日益提升的需求相契合&#xff0c;存在广阔的市场应用前景。受益于动力、消费和储能三大细分领域的快速发展&#xf…

Debug项目失败Run成功

一&#xff1a;问题 idea中启动服务&#xff0c;服务一直在启动中&#xff0c;最后超时启动失败 重新构建项目也是一样 二&#xff1a;个人分析 debug因为断点太多了项目起不起来&#xff0c;试一下run直接运行&#xff0c;项目可以快速启动 三&#xff1a;解决办法 在控制…

Liunx系统怎么设置免密登录?看这一篇!

远程口令爆破也是黑客常用的手段&#xff0c;有些人安全意识薄弱的会设置一些简单的密码&#xff0c;这样分分钟会被黑客爆破进去&#xff0c;一旦操作系统沦陷&#xff0c;里面的数据必将被黑客一览无余&#xff0c;使用免密登录可以有效降低密码被爆破的风险&#xff0c;具体…

docker 方式 elasticsearch 8.13 简单例子

安装 docker 虚拟机安装 elastic search 安装本地 # 创建 elastic 的网络 docker network create elastic # 用镜像的方式创建并启动容器 docker run -d --name es --net elastic -p 9200:9200 -p 9300:9300 -e "discovery.typesingle-node" -e "xpack.secur…

Android 终端查看CPU信息源码分析

代码如下&#xff1a; 终端获取信息&#xff08;左为H9&#xff0c;右为H5&#xff09; 觉得本文对您有用&#xff0c;麻烦点赞、关注、收藏&#xff0c;您的肯定是我创作的无限动力&#xff0c;谢谢&#xff01;&#xff01;&#xff01;

minio安装部署

MinIO 介绍 MinIO是一个对象存储解决方案&#xff0c;它提供了与Amazon Web Services S3兼容的API&#xff0c;并支持所有核心S3功能。 MinIO有能力在任何地方部署 - 公有云或私有云&#xff0c;裸金属基础设施&#xff0c;编排环境&#xff0c;以及边缘基础设施。 MinIO 安装…

Android内核之Binder读写通信:binder_ioctl_write_read用法实例(七十)

简介&#xff1a; CSDN博客专家&#xff0c;专注Android/Linux系统&#xff0c;分享多mic语音方案、音视频、编解码等技术&#xff0c;与大家一起成长&#xff01; 优质专栏&#xff1a;Audio工程师进阶系列【原创干货持续更新中……】&#x1f680; 优质专栏&#xff1a;多媒…

Python专题:三、数字和运算(2)

目录 一、数学运算 二、赋值运算 一、数学运算 1、运算符号 加法 减法- 乘法* 除法/ 计算机中浮点数表示有精度限制&#xff0c;Python有限&#xff0c;所以近似取数 2、除法取整// Python2中 整数/整数 值为整数 Python3中 整数/整数 整数or浮点数 //计算除法对结果取…

植被参数光学遥感反演方法(Python)及遥感与生态模型数据同化算法

原文链接&#xff1a;植被参数光学遥感反演方法(Python)及遥感与生态模型数据同化算法https://mp.weixin.qq.com/s?__bizMzUzNTczMDMxMg&mid2247603741&idx4&sn5b92ff13edfd6e146b7df22ac504c6d5&chksmfa8217facdf59eec9255d24b3e6f6f66b4d2814cae70f85d0ff1a…