numba / llvmlite

A lightweight LLVM python binding for writing JIT compilers
https://llvmlite.pydata.org/
BSD 2-Clause "Simplified" License
1.94k stars 321 forks source link

cannot install llvmlite via poetry #916

Closed buzem closed 1 year ago

buzem commented 1 year ago

poetry.lock file:

[[package]]
name = "llvmlite"
version = "0.36.0"
description = "lightweight wrapper around basic LLVM functionality"
category = "main"
optional = false
python-versions = ">=3.6,<3.10"

Error message:

#0 61.42   Command ['/app/.venv/bin/pip', 'install', '--no-deps', '/root/.cache/pypoetry/artifacts/70/82/5c/f821fccb9b362900c018fef4af6eaf1e2967567686e5ceb86f94254c71/llvmlite-0.36.0.tar.gz'] errored with the following return code 1, and output: 
#0 61.42   Processing /root/.cache/pypoetry/artifacts/70/82/5c/f821fccb9b362900c018fef4af6eaf1e2967567686e5ceb86f94254c71/llvmlite-0.36.0.tar.gz
#0 61.42     Preparing metadata (setup.py): started
#0 61.42     Preparing metadata (setup.py): finished with status 'done'
#0 61.42   Installing collected packages: llvmlite
#0 61.42     DEPRECATION: llvmlite is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
#0 61.42     Running setup.py install for llvmlite: started
#0 61.42     Running setup.py install for llvmlite: finished with status 'error'
#0 61.42     error: subprocess-exited-with-error
#0 61.42     
#0 61.42     × Running setup.py install for llvmlite did not run successfully.
#0 61.42     │ exit code: 1
#0 61.42     ╰─> [14 lines of output]
#0 61.42         running install
#0 61.42         running build
#0 61.42         got version from file /tmp/pip-req-build-cu52hoze/llvmlite/_version.py {'version': '0.36.0', 'full': 'e6bb8d137d922bec8beeb01a237254778759becd'}
#0 61.42         running build_ext
#0 61.42         /app/.venv/bin/python3 /tmp/pip-req-build-cu52hoze/ffi/build.py
#0 61.42         LLVM version... Traceback (most recent call last):
#0 61.42           File "/tmp/pip-req-build-cu52hoze/ffi/build.py", line 220, in <module>
#0 61.42             main()
#0 61.42           File "/tmp/pip-req-build-cu52hoze/ffi/build.py", line 210, in main
#0 61.42             main_posix('linux', '.so')
#0 61.42           File "/tmp/pip-req-build-cu52hoze/ffi/build.py", line 134, in main_posix
#0 61.42             raise RuntimeError(msg) from None
#0 61.42         RuntimeError: Could not find a `llvm-config` binary. There are a number of reasons this could occur, please see: https://llvmlite.readthedocs.io/en/latest/admin-guide/install.html#using-pip for help.
#0 61.42         error: command '/app/.venv/bin/python3' failed with exit status 1
#0 61.42         [end of output]
#0 61.42     
#0 61.42     note: This error originates from a subprocess, and is likely not a problem with pip.
#0 61.42   error: legacy-install-failure
#0 61.42   
#0 61.42   × Encountered error while trying to install package.
#0 61.42   ╰─> llvmlite
#0 61.42   
#0 61.42   note: This is an issue with the package mentioned above, not pip.
#0 61.42   hint: See above for output from the failure.
#0 61.42   
#0 61.42 
#0 61.42   at ~/.local/share/pypoetry/venv/lib/python3.8/site-packages/poetry/utils/env.py:1101 in _run
#0 61.44       1097│                 output = subprocess.check_output(
#0 61.44       1098│                     cmd, stderr=subprocess.STDOUT, **kwargs
#0 61.44       1099│                 )
#0 61.44       1100│         except CalledProcessError as e:
#0 61.44     → 1101│             raise EnvCommandError(e, input=input_)
#0 61.44       1102│ 
#0 61.44       1103│         return decode(output)
#0 61.44       1104│ 
#0 61.44       1105│     def execute(self, bin, *args, **kwargs):
#0 61.44 
esc commented 1 year ago

@buzem which platform and what is your pip version?

esc commented 1 year ago

@buzem also, 0.39.1 is out already, perhaps you can try the newer version?

esc commented 1 year ago

@buzem it may also be an issue with the poetry cache, can you try clearing that and then trying again?

esc commented 1 year ago

Since no response to this was received, I am assuming that one of the suggestions above has helped resolve the issue and will close this issue now. If this should resurface please request to re-open adding additional information. Thank you for using llvmlite!