首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Windows 10上安装numba和llvmlite Python失败

在Windows 10上安装numba和llvmlite Python失败
EN

Stack Overflow用户
提问于 2020-10-16 15:00:45
回答 1查看 3.8K关注 0票数 3

在Windows 10失败时安装numba和llvmlite Python

我尝试在Windows 10上安装Python

安装numba

部分成功,但安装llvmlite失败

代码语言:javascript
复制
Requirement already satisfied: numpy>=1.15 in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (1.19.2+mkl)
Requirement already satisfied: setuptools in c:\users\paul\appdata\local\programs\python\python39\lib\site-packages (from numba) (49.2.1)
Building wheels for collected packages: numba, llvmlite
  Building wheel for numba (setup.py) ... done
  Created wheel for numba: filename=numba-0.51.2-cp39-cp39-win_amd64.whl size=2173229 sha256=249a12f2e1436ac244e2730f6e7ddb5bd53413460dcbdc4ed4e6aeebbf16d6ce
  Stored in directory: c:\users\paul\appdata\local\pip\cache\wheels\0a\51\41\9f5a61bcd9d25271d7021e05cbabcd574fb3d534d07654b780
  Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
  
    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!

不知道LLVM是在哪里安装的?

因此,我使用编辑器添加了值C:\ProgramFiles\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm的LLVM_DIR

希望它将使用我在C:\LLVM\ Clang -1100、C:\LLVM\clang-1000上安装的四个clang版本中的一个.最新的二进制文件是C:\LLVM\clang-1100\LLVM\bin

我还安装了VS 1017和1019,所有编译器都可以从其他IDE和构建中正常工作。

并下载了最新的轮子

llvmlite 0.34.0-cp39-cp39-winamd64.whl

将LLVM_DIR添加到系统路径中。

C:\Program Files\mingw-w64\winlibs-x86_64-posix-seh-gcc-9.3.0-llvm-10.0.0-mingw-w64-7.0.0-r4\mingw64\lib\cmake\llvm

这允许它更接近于工作,但是使用MSVC失败了。

代码语言:javascript
复制
   Microsoft (R) Build Engine version 15.9.21+g9802d43bc3 for .NET Framework
    Copyright (C) Microsoft Corporation. All rights reserved.

    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,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\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\ZERO_CHECK.vcxproj]
    C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\VC\VCTargets\Microsoft.CppBuild.targets(399,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\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
    LINK : fatal error LNK1181: cannot open input file 'D:\winlibs64_stage\custombuilt\lib\libffi.dll.a' [C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build\llvmlite.vcxproj]
    Trying generator 'Visual Studio 15 2017 Win64'
    Traceback (most recent call last):
      File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 191, in <module>
        main()
      File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 179, in main
        main_win32()
      File "C:\Users\Paul\AppData\Local\Temp\pip-install-xvvf77_z\llvmlite\ffi\build.py", line 94, in main_win32
        subprocess.check_call(['cmake', '--build', build_dir, '--config', config])
      File "c:\users\paul\appdata\local\programs\python\python39\lib\subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['cmake', '--build', 'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\ffi\\build', '--config', 'Release']' returned non-zero exit status 1.
    error: command 'c:\\users\\paul\\appdata\\local\\programs\\python\\python39\\python.exe' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: 'c:\users\paul\appdata\local\programs\python\python39\python.exe' -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\llvmlite\\setup.py'"'"'; __file__='"'"'C:\\Users\\Paul\\AppData\\Local\\Temp\\pip-install-xvvf77_z\\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\Paul\AppData\Local\Temp\pip-record-l4absc_g\install-record.txt' --single-version-externally-managed --compile --install-headers 'c:\users\paul\appdata\local\programs\python\python39\Include\llvmlite' Check the logs for full command output.

这意味着未指定输出文件夹位置,或者VS增量构建选项未设置为“不使用”。

或者我应该使用LLVM版本,但是我不知道如何指定哪个版本,而不是使用VS2017。

如何走出这个兔子洞最受欢迎的建议;-)

谢谢

保罗

EN

回答 1

Stack Overflow用户

发布于 2020-12-09 12:11:11

我想安装librosa,但是我得到了带有此错误的堆栈,但我设法用以下方法解决了它:

  • 首先,我下载了llvmlite 这里的最后一个版本。
  • 而不是运行以下命令:

pip install llvmlite-0.35.0-cp39-cp39-win_amd64.whl

  • 接下来,通过librosa对所有软件包进行安装,如下所示:

pip install --no-deps packageName

  • 或者只是为了获得更多的样本,请如下所示:

pip install librosa --ignore-installed llvmlite

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/64391669

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档