尝试在Windows上使用pip安装llvmlite会导致致命错误

时间:2020-05-21 06:27:21

标签: python tensorflow pip

llvmlite是我正在使用的tensorflow项目的要求之一。它基于旧的tensorflow代码,因此我已经安装了所有兼容版本的python,pytorch等。

从requirements.txt安装尝试会导致以下结果:

    Building wheels for collected packages: llvmlite
  Running setup.py bdist_wheel for llvmlite ... error
  Complete output from command c:\users\liamx\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\liamx\\AppData\\Local\\Temp\\pip-build-3yu9r1xr\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d C:\Users\liamx\AppData\Local\Temp\tmpeez41_pvpip-wheel- --python-tag cp35:
  running bdist_wheel
  c:\users\liamx\appdata\local\programs\python\python35\python.exe C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py
  -- Selecting Windows SDK version  to target Windows 10.0.18362.
  CMake Error at CMakeLists.txt:3 (project):
    Failed to run MSBuild command:

      C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

    to get the value of VCTargetsPath:

      Microsoft (R) Build Engine version 14.0.23107.0
      Copyright (C) Microsoft Corporation. All rights reserved.

      Build started 2020-05-21 12:08:40 AM.
      Project "C:\Users\liamx\AppData\Local\Temp\tmpt8r2b2ra\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" on node 1 (default targets).
      C:\Users\liamx\AppData\Local\Temp\tmpt8r2b2ra\CMakeFiles\3.17.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
      Done Building Project "C:\Users\liamx\AppData\Local\Temp\tmpt8r2b2ra\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

      Build FAILED.

      "C:\Users\liamx\AppData\Local\Temp\tmpt8r2b2ra\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" (default target) (1) ->
        C:\Users\liamx\AppData\Local\Temp\tmpt8r2b2ra\CMakeFiles\3.17.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

          0 Warning(s)
          1 Error(s)

      Time Elapsed 00:00:00.17


    Exit code: 1



  -- Configuring incomplete, errors occurred!
  See also "C:/Users/liamx/AppData/Local/Temp/tmpt8r2b2ra/CMakeFiles/CMakeOutput.log".
  -- The C compiler identification is MSVC 19.16.27040.0
  -- The CXX compiler identification is MSVC 19.16.27040.0
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Configuring done
  -- Generating done
  -- Build files have been written to: C:/Users/liamx/AppData/Local/Temp/tmp7ngmx296
  -- The C compiler identification is MSVC 19.16.27040.0
  -- The CXX compiler identification is MSVC 19.16.27040.0
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
  -- Detecting C compiler ABI info
  -- Detecting C compiler ABI info - done
  -- Detecting C compile features
  -- Detecting C compile features - done
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
  -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  CMake Error at CMakeLists.txt:9 (find_package):
    Could not find a package configuration file provided by "LLVM" with any of
    the following names:

      LLVMConfig.cmake
      llvm-config.cmake

    Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
    "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
    provides a separate development package or SDK, be sure it has been
    installed.


  -- Configuring incomplete, errors occurred!
  See also "C:/Users/liamx/AppData/Local/Temp/pip-build-3yu9r1xr/llvmlite/ffi/build/CMakeFiles/CMakeOutput.log".
  Trying generator 'Visual Studio 14 2015 Win64'
  Trying generator 'Visual Studio 15 2017 Win64'
  Traceback (most recent call last):
    File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 192, in <module>
      main()
    File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 180, in main
      main_win32()
    File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 94, in main_win32
      try_cmake(here_dir, build_dir, generator)
    File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 28, in try_cmake
      subprocess.check_call(['cmake', '-G', generator, cmake_dir])
    File "c:\users\liamx\appdata\local\programs\python\python35\lib\subprocess.py", line 271, in check_call
      raise CalledProcessError(retcode, cmd)
  subprocess.CalledProcessError: Command '['cmake', '-G', 'Visual Studio 15 2017 Win64', 'C:\\Users\\liamx\\AppData\\Local\\Temp\\pip-build-3yu9r1xr\\llvmlite\\ffi']' returned non-zero exit status 1
  error: command 'c:\\users\\liamx\\appdata\\local\\programs\\python\\python35\\python.exe' failed with exit status 1

  ----------------------------------------
  Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
Installing collected packages: llvmlite, numba, umap-learn, torchfile, pyzmq, tornado, websocket-client, idna, urllib3, certifi, chardet, requests, jsonpointer, jsonpatch, visdom, webrtcvad, pycparser, CFFI, soundfile, resampy, audioread, decorator, librosa, python-dateutil, pyparsing, kiwisolver, cycler, matplotlib, tqdm, sounddevice, PyQt5-sip, PyQt5, dill, multiprocess
  Running setup.py install for llvmlite ... error
    Complete output from command c:\users\liamx\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\liamx\\AppData\\Local\\Temp\\pip-build-3yu9r1xr\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\liamx\AppData\Local\Temp\pip-ezdc6gk2-record\install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    got version from file C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\llvmlite/_version.py {'full': 'aa11b129c0b55973067422397821ae6d44fa5e70', 'version': '0.32.1'}
    running build_ext
    c:\users\liamx\appdata\local\programs\python\python35\python.exe C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py
    -- Selecting Windows SDK version  to target Windows 10.0.18362.
    CMake Error at CMakeLists.txt:3 (project):
      Failed to run MSBuild command:

        C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe

      to get the value of VCTargetsPath:

        Microsoft (R) Build Engine version 14.0.23107.0
        Copyright (C) Microsoft Corporation. All rights reserved.

        Build started 2020-05-21 12:09:24 AM.
        Project "C:\Users\liamx\AppData\Local\Temp\tmpo4uk5ich\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" on node 1 (default targets).
        C:\Users\liamx\AppData\Local\Temp\tmpo4uk5ich\CMakeFiles\3.17.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.
        Done Building Project "C:\Users\liamx\AppData\Local\Temp\tmpo4uk5ich\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" (default targets) -- FAILED.

        Build FAILED.

        "C:\Users\liamx\AppData\Local\Temp\tmpo4uk5ich\CMakeFiles\3.17.2\VCTargetsPath.vcxproj" (default target) (1) ->
          C:\Users\liamx\AppData\Local\Temp\tmpo4uk5ich\CMakeFiles\3.17.2\VCTargetsPath.vcxproj(14,2): error MSB4019: The imported project "C:\Microsoft.Cpp.Default.props" was not found. Confirm that the path in the <Import> declaration is correct, and that the file exists on disk.

            0 Warning(s)
            1 Error(s)

        Time Elapsed 00:00:00.17


      Exit code: 1



    -- Configuring incomplete, errors occurred!
    See also "C:/Users/liamx/AppData/Local/Temp/tmpo4uk5ich/CMakeFiles/CMakeOutput.log".
    -- The C compiler identification is MSVC 19.16.27040.0
    -- The CXX compiler identification is MSVC 19.16.27040.0
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
    -- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - done
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe
    -- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x64/cl.exe - works
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - done
    -- Detecting CXX compile features
    -- Detecting CXX compile features - done
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/Users/liamx/AppData/Local/Temp/tmpi2bnf6mi
    CMake Error at CMakeLists.txt:9 (find_package):
      Could not find a package configuration file provided by "LLVM" with any of
      the following names:

        LLVMConfig.cmake
        llvm-config.cmake

      Add the installation prefix of "LLVM" to CMAKE_PREFIX_PATH or set
      "LLVM_DIR" to a directory containing one of the above files.  If "LLVM"
      provides a separate development package or SDK, be sure it has been
      installed.


    -- Configuring incomplete, errors occurred!
    See also "C:/Users/liamx/AppData/Local/Temp/pip-build-3yu9r1xr/llvmlite/ffi/build/CMakeFiles/CMakeOutput.log".
    Trying generator 'Visual Studio 14 2015 Win64'
    Trying generator 'Visual Studio 15 2017 Win64'
    Traceback (most recent call last):
      File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 192, in <module>
        main()
      File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 180, in main
        main_win32()
      File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 94, in main_win32
        try_cmake(here_dir, build_dir, generator)
      File "C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\ffi\build.py", line 28, in try_cmake
        subprocess.check_call(['cmake', '-G', generator, cmake_dir])
      File "c:\users\liamx\appdata\local\programs\python\python35\lib\subprocess.py", line 271, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '-G', 'Visual Studio 15 2017 Win64', 'C:\\Users\\liamx\\AppData\\Local\\Temp\\pip-build-3yu9r1xr\\llvmlite\\ffi']' returned non-zero exit status 1
    error: command 'c:\\users\\liamx\\appdata\\local\\programs\\python\\python35\\python.exe' failed with exit status 1

    ----------------------------------------
Command "c:\users\liamx\appdata\local\programs\python\python35\python.exe -u -c "import setuptools, tokenize;__file__='C:\\Users\\liamx\\AppData\\Local\\Temp\\pip-build-3yu9r1xr\\llvmlite\\setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record C:\Users\liamx\AppData\Local\Temp\pip-ezdc6gk2-record\install-record.txt --single-version-externally-managed --compile" failed with error code 1 in C:\Users\liamx\AppData\Local\Temp\pip-build-3yu9r1xr\llvmlite\

我对tensorflow及其相关的依赖项非常陌生,但是我浏览了有关Visual Studio的其他文章,安装了VS 2019、2017和2015,以及它们的开发工具,尤其是C ++工具。每次安装Visual Studio后,我都会重新启动PC。

我还针对所有版本的Visual Studio进行了here描述的修复程序,该修复程序针对与我有类似问题的另一个回购解决了该问题,但尚未解决。

0 个答案:

没有答案