使用pip安装turicreate时出错...同时为llvmlite构建轮子

我正在尝试使用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,'"'"'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",in <module>
        main()
      File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py",in main
        main_posix('osx','.dylib')
      File "/private/var/folders/8s/14fz39z503n7hqftf_yg1nyr0000gn/T/pip-install-00VSH7/llvmlite/ffi/build.py",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,'"'"'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.
i850528 回答:使用pip安装turicreate时出错...同时为llvmlite构建轮子

对于第二个错误,您将需要专门安装 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

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

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

这样做之后,请记住将其来源

source ~/.bashrc. ~/.bashrc

,

我在尝试使用 tslearn 安装 python3.9 时遇到了 llvmlite 的问题。在对不同版本和 github 社区进行了如此多的挣扎之后,我想出了安装 llvmlitepython3.8 的解决方案,它工作得很好。我尝试使用 python3.9python2.7 进行安装,但它们在安装 llvmlite 时可能存在一些版本支持问题。

本文链接:https://www.f2er.com/2403999.html

大家都在问