numba / llvmlite

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

Python 3.12 #1011

Closed esc closed 1 year ago

esc commented 1 year ago

This issue tracks overall progress for Python 3.12 support for llvmlite.

jowodo commented 1 year ago
$ python3.12 -m pip install llvmlite
Building wheels for collected packages: llvmlite
  Building wheel for llvmlite (setup.py) ... error
  error: subprocess-exited-with-error

  _ python setup.py bdist_wheel did not run successfully.
  _ exit code: 1
  __> [11 lines of output]
      running bdist_wheel
      /app/python3/3.12.0/bin/python3.12 /tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py
      LLVM version... Traceback (most recent call last):
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 228, in <module>
          main()
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 218, in main
          main_posix('linux', '.so')
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 135, in main_posix
          raise RuntimeError(msg) from None
      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.
      error: command '/app/python3/3.12.0/bin/python3.12' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
ERROR: Could not build wheels for llvmlite, which is required to install pyproject.toml-based projects

Linux on x86_64, happy to test or provide more info if needed

esc commented 1 year ago
$ python3.12 -m pip install llvmlite
Building wheels for collected packages: llvmlite
  Building wheel for llvmlite (setup.py) ... error
  error: subprocess-exited-with-error

  _ python setup.py bdist_wheel did not run successfully.
  _ exit code: 1
  __> [11 lines of output]
      running bdist_wheel
      /app/python3/3.12.0/bin/python3.12 /tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py
      LLVM version... Traceback (most recent call last):
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 228, in <module>
          main()
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 218, in main
          main_posix('linux', '.so')
        File "/tmp/pip-install-o0ossaid/llvmlite_c31f6f8e81e140388dd90ad54a6c8036/ffi/build.py", line 135, in main_posix
          raise RuntimeError(msg) from None
      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.
      error: command '/app/python3/3.12.0/bin/python3.12' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for llvmlite
  Running setup.py clean for llvmlite
Failed to build llvmlite
ERROR: Could not build wheels for llvmlite, which is required to install pyproject.toml-based projects

Linux on x86_64, happy to test or provide more info if needed

@jowodo thank you for your input. The reason for this is that we have not yet provided wheels for 3.12 - so the above will attempt to compile llvmlite against LLVM -- which you do not have on your system. The wheels will be pre-compiled and carry LLVM inside of them, so you won't need to compile anything and pip install will just work.

jowodo commented 1 year ago

thanks for the explanation!

esc commented 1 year ago

https://github.com/numba/llvmlite/pull/1010 was merged and this is now complete.

esc commented 1 year ago

FYI: there are now development releases of llvmlite available from the numba/label/dev channel on anaconda.org:

https://anaconda.org/numba/llvmlite/files?version=0.42.0dev0

You can install with:

conda install -c numba/label/dev llvmlite=0.42.0dev0