Visual Studio dlib安装错误,cl.exe无法编译简单的测试程序

6rqinv9w  于 2023-11-21  发布在  其他
关注(0)|答案(1)|浏览(158)

我在我的笔记本电脑上安装dlib时遇到问题。我需要dlib来使用face_recognition python包。我使用visual studio 2022社区。
所以我以前安装过dlib,我知道如何安装它。我知道你应该下载visual studio并安装它的c++部分,然后使用pip安装cmake。一年前我在python 3.6和python 3.9上在笔记本电脑上做过这个。
几天前,我想在python 3.8上安装它,但我一直得到下面的错误.所以我教python版本与它有关.我可以访问我的大学计算机.我能够在python 3.10.somehting上安装dlib在我的大学计算机上,它工作得很好,所以我在我的笔记本电脑上安装了相同的python版本,它不工作(同样的错误).
因此,从这一点我得出的结论是,它不是python版本和问题是与我的笔记本电脑。错误说cl.exe不能运行一个示例程序,所以我认为可能有一个问题与visual studio。我安装和重新安装visual studio多次(3至4次),我一直得到同样的错误。
还有另一个观察,我做的,当我卸载并重新安装dlib上的2个版本(3.9和3.6)的python,我已经使用了一年回来,它能够正确安装它没有错误。
我花了将近8个小时在这上面,它变得超级令人沮丧!如果有人能给予我在我的情况下能做些什么的建议,我将非常感激。

  • 如果问题描述太长,请告诉我 *

有没有可能是我安装的其他应用程序导致了这个问题?

C:\Users\Kharghuvel>pip install dlib
Collecting dlib
  Using cached dlib-19.24.2.tar.gz (11.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dlib
  Building wheel for dlib (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for dlib (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [132 lines of output]
      running bdist_wheel
      running build
      running build_ext
      <string>:125: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
      Building extension for Python 3.10.9 (tags/v3.10.9:1dd9be6, Dec  6 2022, 20:01:21) [MSC v.1934 64 bit (AMD64)]
      Invoking CMake setup: 'cmake C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\tools\python -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\lib.win-amd64-cpython-310 -DPYTHON_EXECUTABLE=C:\Users\Kharghuvel\AppData\Local\Programs\Python\Python310\python.exe -DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\lib.win-amd64-cpython-310 -A x64'
      -- Building for: Visual Studio 17 2022
      -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.22621.
      -- The C compiler identification is MSVC 19.36.32537.0
      -- The CXX compiler identification is MSVC 19.36.32537.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: E:/Visual Studio community 2022/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe
      -- Check for working C compiler: E:/Visual Studio community 2022/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe - broken
      CMake Error at C:/Users/Kharghuvel/AppData/Local/Temp/pip-build-env-t79xzg2d/overlay/Lib/site-packages/cmake/data/share/cmake-3.26/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler

          "E:/Visual Studio community 2022/VC/Tools/MSVC/14.36.32532/bin/Hostx64/x64/cl.exe"

        is not able to compile a simple test program.

        It fails with the following output:

          Change Dir: C:/Users/Kharghuvel/AppData/Local/Temp/pip-install-u47nsqdb/dlib_54426e676ce04cd8be1cffdfb8367a63/build/temp.win-amd64-cpython-310/Release/CMakeFiles/CMakeScratch/TryCompile-9mnlfb

          Run Build Command(s):E:/Visual Studio community 2022/MSBuild/Current/Bin/amd64/MSBuild.exe cmTC_27432.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n && MSBuild version 17.6.3+07e294721 for .NET Framework
          Build started 7/17/2023 9:21:57 PM.

          Project "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj" on node 1 (default targets).
          PrepareForBuild:
            Creating directory "cmTC_27432.dir\Debug\".
            Creating directory "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\Debug\".
            Creating directory "cmTC_27432.dir\Debug\cmTC_27432.tlog\".
          InitializeBuildStatus:
            Creating "cmTC_27432.dir\Debug\cmTC_27432.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
          ClCompile:
            E:\Visual Studio community 2022\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\CL.exe /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_27432.dir\Debug\\" /Fd"cmTC_27432.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\testCCompiler.c"
            Microsoft (R) C/C++ Optimizing Compiler Version 19.36.32537 for x64
            testCCompiler.c
            Copyright (C) Microsoft Corporation.  All rights reserved.
            cl /c /Zi /W3 /WX- /diagnostics:column /Od /Ob0 /D _MBCS /D WIN32 /D _WINDOWS /D "CMAKE_INTDIR=\"Debug\"" /Gm- /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"cmTC_27432.dir\Debug\\" /Fd"cmTC_27432.dir\Debug\vc143.pdb" /external:W3 /Gd /TC /errorReport:queue "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\testCCompiler.c"
          Link:
            E:\Visual Studio community 2022\VC\Tools\MSVC\14.36.32532\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\Debug\cmTC_27432.exe" /INCREMENTAL /ILK:"cmTC_27432.dir\Debug\cmTC_27432.ilk" /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"C:/Users/Kharghuvel/AppData/Local/Temp/pip-install-u47nsqdb/dlib_54426e676ce04cd8be1cffdfb8367a63/build/temp.win-amd64-cpython-310/Release/CMakeFiles/CMakeScratch/TryCompile-9mnlfb/Debug/cmTC_27432.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/Kharghuvel/AppData/Local/Temp/pip-install-u47nsqdb/dlib_54426e676ce04cd8be1cffdfb8367a63/build/temp.win-amd64-cpython-310/Release/CMakeFiles/CMakeScratch/TryCompile-9mnlfb/Debug/cmTC_27432.lib" /MACHINE:X64  /machine:x64 cmTC_27432.dir\Debug\testCCompiler.obj
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003: The specified task executable "link.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.dir\Debug\cmTC_27432.tlog'. [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.PostExecuteTool(Int32 exitCode) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          Done Building Project "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj" (default targets) -- FAILED.

          Build FAILED.

          "C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj" (default target) (1) ->
          (Link target) ->
            E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003: The specified task executable "link.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.dir\Debug\cmTC_27432.tlog'. [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.PostExecuteTool(Int32 exitCode) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]
          E:\Visual Studio community 2022\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(1127,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\Kharghuvel\AppData\Local\Temp\pip-install-u47nsqdb\dlib_54426e676ce04cd8be1cffdfb8367a63\build\temp.win-amd64-cpython-310\Release\CMakeFiles\CMakeScratch\TryCompile-9mnlfb\cmTC_27432.vcxproj]

              0 Warning(s)
              1 Error(s)

          Time Elapsed 00:00:00.89



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

      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "C:\Users\Kharghuvel\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\Kharghuvel\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "C:\Users\Kharghuvel\AppData\Local\Programs\Python\Python310\lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
          return _build_backend().build_wheel(wheel_directory, config_settings,
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\build_meta.py", line 416, in build_wheel
          return self._build_with_temp_dir(['bdist_wheel'], '.whl',
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\build_meta.py", line 401, in _build_with_temp_dir
          self.run_setup()
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 218, in <module>
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\__init__.py", line 107, in setup
          return distutils.core.setup(**attrs)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
          return run_commands(dist)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
          dist.run_commands()
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
          self.run_command(cmd)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
          super().run_command(command)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 343, in run
          self.run_command("build")
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
          super().run_command(command)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
          self.run_command(cmd_name)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
          self.distribution.run_command(command)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\dist.py", line 1234, in run_command
          super().run_command(command)
        File "C:\Users\Kharghuvel\AppData\Local\Temp\pip-build-env-t79xzg2d\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
          cmd_obj.run()
        File "<string>", line 130, in run
        File "<string>", line 167, in build_extension
        File "C:\Users\Kharghuvel\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 369, in check_call
          raise CalledProcessError(retcode, cmd)
      subprocess.CalledProcessError: Command '['cmake', 'C:\\Users\\Kharghuvel\\AppData\\Local\\Temp\\pip-install-u47nsqdb\\dlib_54426e676ce04cd8be1cffdfb8367a63\\tools\\python', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\\Users\\Kharghuvel\\AppData\\Local\\Temp\\pip-install-u47nsqdb\\dlib_54426e676ce04cd8be1cffdfb8367a63\\build\\lib.win-amd64-cpython-310', '-DPYTHON_EXECUTABLE=C:\\Users\\Kharghuvel\\AppData\\Local\\Programs\\Python\\Python310\\python.exe', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=C:\\Users\\Kharghuvel\\AppData\\Local\\Temp\\pip-install-u47nsqdb\\dlib_54426e676ce04cd8be1cffdfb8367a63\\build\\lib.win-amd64-cpython-310', '-A', 'x64']' returned non-zero exit status 1.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for dlib
Failed to build dlib
ERROR: Could not build wheels for dlib, which is required to install pyproject.toml-based projects

字符串

fdbelqdn

fdbelqdn1#

我有一个类似的错误。在搜索了一下,它看起来像是由于构建路径太长造成的。
我的做法是将环境变量TMP和TEMP设置为c:\tmp
这使得pip使用c:\tmp作为临时文件的根文件夹。默认值是C:/Users//AppData/Local/Temp/,它已经很长了,然后会在里面创建更长的文件和文件夹。

相关问题