PromtEngineer / localGPT

Chat with your documents on your local device using GPT models. No data leaves your device and 100% private.
Apache License 2.0
19.64k stars 2.2k forks source link

ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects #361

Open TanmayDoesAI opened 11 months ago

TanmayDoesAI commented 11 months ago

Before anyone refers me to any other issue, let me mention I have tried all possible ways I could find on the issues, but can't get this to work really.

I ran this: (localgpt_api) D:\textgen\localgpt_api>pip install -r requirements.txt

and got: in the start normal installations but then when it came to llamacpp


Using cached rpds_py-0.9.2-cp310-none-win_amd64.whl (180 kB)
Using cached exceptiongroup-1.1.2-py3-none-any.whl (14 kB)
Building wheels for collected packages: llama-cpp-python, auto-gptq, docx2txt, htbuilder, st-annotated-text
  Building wheel for llama-cpp-python (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Building wheel for llama-cpp-python (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [197 lines of output]

      --------------------------------------------------------------------------------
      -- 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.

      -- The C compiler identification is GNU 6.3.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/MinGW/bin/gcc.exe - skipped
      -- Detecting C compile features
      -- Detecting C compile features - done
      -- The CXX compiler identification is GNU 6.3.0
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/MinGW/bin/c++.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      CMake Error at CMakeLists.txt:9 (message):
        MSVC is required to pass this check.

      -- 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.

      -- The C compiler identification is MSVC 19.37.32822.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - done
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/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.32822.0
      -- Detecting CXX compiler ABI info
      -- Detecting CXX compiler ABI info - done
      -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - skipped
      -- Detecting CXX compile features
      -- Detecting CXX compile features - done
      -- Configuring done (4.2s)
      -- Generating done (0.0s)
      -- Build files have been written to: C:/Users/tanma/AppData/Local/Temp/pip-install-_a18ageq/llama-cpp-python_525578dea45843cc8d823064aa35b4e6/_cmake_test_compile/build
      --
      -------
      ------------
      -----------------
      ----------------------
      ---------------------------
      --------------------------------
      -- Trying 'Visual Studio 17 2022 x64 v143' generator - success
      --------------------------------------------------------------------------------

      Configuring Project
        Working directory:
          C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build
        Command:
          'C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6' -G 'Visual Studio 17 2022' --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.10.0 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPYTHON_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' '-DPython_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPython_ROOT_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPython_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' '-DPython3_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPython3_ROOT_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPython3_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' -T v143 -A x64 -DCMAKE_BUILD_TYPE:STRING=Release

      Not searching for unused variables given on the command line.
      -- The C compiler identification is MSVC 19.37.32822.0
      -- The CXX compiler identification is MSVC 19.37.32822.0
      -- Detecting C compiler ABI info
      -- Detecting C compiler ABI info - failed
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe
      -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.37.32822/bin/Hostx64/x64/cl.exe - broken
      CMake Error at C:/Users/tanma/AppData/Local/Temp/pip-build-env-dla3c3yi/overlay/Lib/site-packages/cmake/data/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
        The C compiler

          "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/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/tanma/AppData/Local/Temp/pip-install-_a18ageq/llama-cpp-python_525578dea45843cc8d823064aa35b4e6/_skbuild/win-amd64-3.10/cmake-build/CMakeFiles/CMakeScratch/TryCompile-7obvcd'

          Run Build Command(s): "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/amd64/MSBuild.exe" cmTC_799c7.vcxproj /p:Configuration=Debug /p:Platform=x64 /p:VisualStudioVersion=17.0 /v:n
          MSBuild version 17.7.2+d6990bcfa for .NET Framework
          Build started 13-08-2023 18:44:30.

          Project "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj" on node 1 (default targets).
          PrepareForBuild:
            Creating directory "cmTC_799c7.dir\Debug\".
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
            Creating directory "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\Debug\".
            Creating directory "cmTC_799c7.dir\Debug\cmTC_799c7.tlog\".
          InitializeBuildStatus:
            Creating "cmTC_799c7.dir\Debug\cmTC_799c7.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
            Touching "cmTC_799c7.dir\Debug\cmTC_799c7.tlog\unsuccessfulbuild".
          ClCompile:
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.37.32822\bin\HostX64\x64\CL.exe /c /Zi /W1 /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_799c7.dir\Debug\\" /Fd"cmTC_799c7.dir\Debug\vc143.pdb" /external:W1 /Gd /TC /errorReport:queue "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\testCCompiler.c"
            Microsoft (R) C/C++ Optimizing Compiler Version 19.37.32822 for x64
            testCCompiler.c
            Copyright (C) Microsoft Corporation.  All rights reserved.
            cl /c /Zi /W1 /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_799c7.dir\Debug\\" /Fd"cmTC_799c7.dir\Debug\vc143.pdb" /external:W1 /Gd /TC /errorReport:queue "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\testCCompiler.c"
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.dir\Debug\cmTC_799c7.tlog'. [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          Done Building Project "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj" (default targets) -- FAILED.

          Build FAILED.

          "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj" (default target) (1) ->
          (PrepareForBuild target) ->
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppBuild.targets(541,5): warning MSB8029: The Intermediate directory or Output directory cannot reside under the Temporary directory as it could lead to issues with incremental build. [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]

          "C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj" (default target) (1) ->
          (ClCompile target) ->
            C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003: The specified task executable "CL.exe" could not be run. System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.dir\Debug\cmTC_799c7.tlog'. [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1.CommonInit() [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at System.IO.Directory.GetFiles(String path, String searchPattern) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.TrackedDependencies.ExpandWildcards(ITaskItem[] expand) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.CanonicalTrackedOutputFiles.InternalConstruct(ITask ownerTask, ITaskItem[] tlogFiles, Boolean constructOutputsFromTLogs) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.CPPTasks.CL.PostExecuteTool(Int32 exitCode) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.CPPTasks.TrackedVCToolTask.ExecuteTool(String pathToTool, String responseFileCommands, String commandLineCommands) [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]
          C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(741,5): error MSB6003:    at Microsoft.Build.Utilities.ToolTask.Execute() [C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build\CMakeFiles\CMakeScratch\TryCompile-7obvcd\cmTC_799c7.vcxproj]

              1 Warning(s)
              1 Error(s)

          Time Elapsed 00:00:00.34

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

      -- Configuring incomplete, errors occurred!
      Traceback (most recent call last):
        File "C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\skbuild\setuptools_wrap.py", line 666, in setup
          env = cmkr.configure(
        File "C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\skbuild\cmaker.py", line 357, in configure
          raise SKBuildError(msg)

      An error occurred while configuring with CMake.
        Command:
          'C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\cmake\data\bin/cmake.exe' 'C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6' -G 'Visual Studio 17 2022' --no-warn-unused-cli '-DCMAKE_INSTALL_PREFIX:PATH=C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-install' -DPYTHON_VERSION_STRING:STRING=3.10.0 -DSKBUILD:INTERNAL=TRUE '-DCMAKE_MODULE_PATH:PATH=C:\Users\tanma\AppData\Local\Temp\pip-build-env-dla3c3yi\overlay\Lib\site-packages\skbuild\resources\cmake' '-DPYTHON_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPYTHON_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPYTHON_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' '-DPython_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPython_ROOT_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api' -DPython_FIND_REGISTRY:STRING=NEVER '-DPython_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPython_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' '-DPython3_EXECUTABLE:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\python.exe' '-DPython3_ROOT_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api' -DPython3_FIND_REGISTRY:STRING=NEVER '-DPython3_INCLUDE_DIR:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\Include' '-DPython3_LIBRARY:PATH=C:\Users\tanma\anaconda3\envs\localgpt_api\libs\python310.lib' -T v143 -A x64 -DCMAKE_BUILD_TYPE:STRING=Release
        Source directory:
          C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6
        Working directory:
          C:\Users\tanma\AppData\Local\Temp\pip-install-_a18ageq\llama-cpp-python_525578dea45843cc8d823064aa35b4e6\_skbuild\win-amd64-3.10\cmake-build
      Please see CMake's output for more information.

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llama-cpp-python
  Building wheel for auto-gptq (setup.py) ... done
  Created wheel for auto-gptq: filename=auto_gptq-0.2.2-py3-none-any.whl size=58299 sha256=b132a0965a824fb8c4d20487e775c13f065d6c8f2e0b5a9c56099ba4d66af39c
  Stored in directory: c:\users\tanma\appdata\local\pip\cache\wheels\bf\f6\50\bb6ab784e7824cbf190a1a8205d91e6543287718fb21d5b033
  Building wheel for docx2txt (setup.py) ... done
  Created wheel for docx2txt: filename=docx2txt-0.8-py3-none-any.whl size=3973 sha256=9fdf8c09187762a47565f3e831dc17cf4c7bd23e7b57bb11cb57d62bb1e64142
  Stored in directory: c:\users\tanma\appdata\local\pip\cache\wheels\22\58\cf\093d0a6c3ecfdfc5f6ddd5524043b88e59a9a199cb02352966
  Building wheel for htbuilder (setup.py) ... done
  Created wheel for htbuilder: filename=htbuilder-0.6.1-py3-none-any.whl size=12481 sha256=753c7e5d76b6eec3c3ad2f0944246056e4d755aab54c1f1cea6d696aed84a1ed
  Stored in directory: c:\users\tanma\appdata\local\pip\cache\wheels\12\d3\e9\e499c6b18281f756e41e385735cf3ea6980baf126f093b0ba1
  Building wheel for st-annotated-text (setup.py) ... done
  Created wheel for st-annotated-text: filename=st_annotated_text-4.0.0-py3-none-any.whl size=8927 sha256=6698ee01f48ce7fdfd6f24f9e06ddaf037c6b250e4da2fd0c625848a7a38d791
  Stored in directory: c:\users\tanma\appdata\local\pip\cache\wheels\75\24\e8\1c0562e6308f0fff00c6f25972c0bf0a78fbf2be2dc65ef148
Successfully built auto-gptq docx2txt htbuilder st-annotated-text
Failed to build llama-cpp-python
ERROR: Could not build wheels for llama-cpp-python, which is required to install pyproject.toml-based projects```

I have Visual studio installed, I tried reinstalling just in case that would've helped already
DeRoelO commented 11 months ago

I get this same problem, sadly i am not an expert. Tried updating VS studio but no luck.

nithinprabhu commented 11 months ago

@TanmayDoesAI @DeRoelO Try after installing Microsoft C++ Build Tools from here

Additionally, you can also install Desktop development with C++ workload using the Visual Studio Installer.

image

I had to install both to get it work

baznta commented 11 months ago

Hi, currently experiencing a similar error when trying to run LocalGPT on ubuntu server, any fixes?

derek-james commented 11 months ago

To get this to work, I uninstalled everything related to VS and Anaconda, then did fresh reinstalls with Python and C++ components in VS. Then I ran into an issue with cuda tools not being recognized, so I completely uninstalled torch/torchvision and did a fresh reinstall with cuda tools. Now it's working, but it's incredibly slow (3-5 min for a simple prompt/response).