为llvmlite构建控制盘时,使用pip…安装turicreate时出错

2024-09-29 17:47:28 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试使用pip install turicreate安装turicreate,但收到以下错误。我不知道这个错误告诉我该怎么做

评论中有人问我是否正确安装了llvm。我该怎么做

我尝试使用pip install --upgrade scipy升级Scipy,但这没有帮助

 Building wheel for llvmlite (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/harshavardhanhr/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/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 /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-wheel-e0QD2K
       cwd: /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/
  Complete output (11 lines):
  running bdist_wheel
  /Users/harshavardhanhr/venv/bin/python /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py
  LLVM version... Traceback (most recent call last):
    File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 168, in <module>
      main()
    File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 162, in main
      main_posix('osx', '.dylib')
    File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 109, in main_posix
      "to the path for llvm-config" % (llvm_config,))
  RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
  error: command '/Users/harshavardhanhr/venv/bin/python' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
ERROR: tensorflow 2.1.0 has requirement scipy==1.2.2; python_version < "3", but you'll have scipy 1.2.3 which is incompatible.
Installing collected packages: llvmlite, funcsigs, singledispatch, numba, resampy, mock, opt-einsum, h5py, keras-applications, gast, keras-preprocessing, pyasn1, rsa, cachetools, pyasn1-modules, google-auth, idna, chardet, urllib3, certifi, requests, werkzeug, oauthlib, requests-oauthlib, google-auth-oauthlib, futures, grpcio, absl-py, markdown, tensorboard, backports.weakref, tensorflow-estimator, functools32, astor, termcolor, wrapt, google-pasta, tensorflow, decorator, python-dateutil, pytz, pandas, turicreate
    Running setup.py install for llvmlite ... error
    ERROR: Command errored out with exit status 1:
     command: /Users/harshavardhanhr/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/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 /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-record-Tq46YM/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harshavardhanhr/venv/include/site/python2.7/llvmlite
         cwd: /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/
    Complete output (14 lines):
    running install
    running build
    got version from file /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/llvmlite/_version.py {'version': '0.32.0', 'full': '26059d238f4ba23dff74703dd27168591d889edd'}
    running build_ext
    /Users/harshavardhanhr/venv/bin/python /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py
    LLVM version... Traceback (most recent call last):
      File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 168, in <module>
        main()
      File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 162, in main
        main_posix('osx', '.dylib')
      File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py", line 109, in main_posix
        "to the path for llvm-config" % (llvm_config,))
    RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config
    error: command '/Users/harshavardhanhr/venv/bin/python' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/harshavardhanhr/venv/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/setup.py'"'"'; __file__='"'"'/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/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 /private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-record-Tq46YM/install-record.txt --single-version-externally-managed --compile --install-headers /Users/harshavardhanhr/venv/include/site/python2.7/llvmlite Check the logs for full command output.

Tags: installpippybuildforvarsetupprivate
3条回答

对于第二个错误,您需要专门安装scipy版本1.2.2

pip install 'scipy==1.2.2'

这是你的错误的重要部分,隐藏在中间

RuntimeError: llvm-config failed executing, please point LLVM_CONFIG to the path for llvm-config

这可能意味着您必须在~/.bashrc中设置LLVM_CONFIG,类似于

export LLVM_CONFIG=/usr/local/opt/llvm@9/bin/llvm-config

这样做之后,记得找到它的来源

source ~/.bashrc. ~/.bashrc

当我试图用python3.9安装tslearn时,我遇到了llvmlite的问题。在与不同版本和github社区进行了大量的斗争之后,我想出了一个解决方案,用python3.8安装llvmlite,效果非常好。我尝试使用python3.9python2.7进行安装,但在安装llvmlite时,它们可能存在一些版本支持问题

相关问题 更多 >

    热门问题