llvmlite icon indicating copy to clipboard operation
llvmlite copied to clipboard

llvmlite CI support for Python 3.14

Open swap357 opened this issue 3 months ago • 13 comments

This issue is to document and track the changes required to add initial support for Python 3.14 on CI. Python 3.14 is currently in pre-release (final release scheduled for October 7, 2025) per PEP 745

At present, we are using workarounds to build against pre-release versions. Once official release builds and packages are available, those will be reverted.

The goal is to:

  • Enable CI jobs against Python 3.14 pre-releases.
  • Identify and document any failures/required changes.
  • Ensure CI is ready for Python 3.14 on the official release date.

swap357 avatar Sep 09 '25 15:09 swap357

https://github.com/numba/llvmlite/pull/1279 adds CI support for llvmlite build and test GHA workflows.

Follow-up items -

  • [x] Remove ad-testing/label/py314 dependency once upstream packages are published.
  • [ ] Re-enable lief dependency in 3.14 test jobs once it has upstream support.

swap357 avatar Sep 09 '25 15:09 swap357

The initial part of this was solved with https://github.com/numba/llvmlite/pull/1279

esc avatar Sep 25 '25 20:09 esc

opened PR https://github.com/numba/llvmlite/pull/1311 to cleanup after official release and conda support for python 3.14.

swap357 avatar Oct 01 '25 02:10 swap357

python 3.14t no GIL

(venv314t) PS C:\Users\User_Niki\venv314t> pip install llvmlite==0.46.0b1 Collecting llvmlite==0.46.0b1 Using cached llvmlite-0.46.0b1.tar.gz (185 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: llvmlite Building wheel for llvmlite (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for llvmlite (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [46 lines of output] running bdist_wheel C:\Users\User_Niki\venv314t\Scripts\python.exe C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py Trying generator ('Visual Studio 17 2022', 'x64', 'v143') Running: cmake -G Visual Studio 17 2022 -A x64 -T v143 C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\dummy Traceback (most recent call last): File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 198, in main()

File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 188, in main
main_windows()
~~~~~~~~~~~~^^
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 163, in main_windows
generator = find_windows_generator()
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 130, in find_windows_generator
try_cmake(cmake_dir, build_dir, *generator)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 95, in try_cmake
subprocess.check_call(args)
~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 414, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files\Python314\Lib\subprocess.py", line 395, in call
with Popen(*popenargs, **kwargs) as p:
~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 1038, in init
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
...<5 lines>...
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 1552, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
# no special security
^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
cwd,
^^^^
startupinfo)
^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Не удается найти указанный файл
error: command 'C:\Users\User_Niki\venv314t\Scripts\python.exe' 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
Failed to build llvmlite
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> llvmlite
(venv314t) PS C:\Users\User_Niki\venv314t> python.exe
Python 3.14.0 free-threading build (tags/v3.14.0:ebf955d, Oct 7 2025, 10:13:09) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

exit
(venv314t) PS C:\Users\User_Niki\venv314t>

nikimagic avatar Oct 24 '25 11:10 nikimagic

Image

nikimagic avatar Oct 24 '25 11:10 nikimagic

@nikimagic this issue is about adding CI support for Python 3.14 -- what do you wish to communicate with your comments? It looks like you tried to install 0.46.0b1 -- but the binary could not be installed and compiling from source failed?

esc avatar Oct 24 '25 11:10 esc

@nikimagic this issue is about adding CI support for Python 3.14 -- what do you wish to communicate with your comments? It looks like you tried to install 0.46.0b1 -- but the binary could not be installed and compiling from source failed?

Venv python3.14 ok Venv python3.14t no gil error install

nikimagic avatar Oct 24 '25 13:10 nikimagic

@nikimagic this issue is about adding CI support for Python 3.14 -- what do you wish to communicate with your comments? It looks like you tried to install 0.46.0b1 -- but the binary could not be installed and compiling from source failed?

Venv python3.14 ok Venv python3.14t no gil error install

OK, thank you for the report, I have created https://github.com/numba/llvmlite/issues/1338 to track.

esc avatar Oct 24 '25 15:10 esc

python 3.14t no GIL

(venv314t) PS C:\Users\User_Niki\venv314t> pip install llvmlite==0.46.0b1 Collecting llvmlite==0.46.0b1 Using cached llvmlite-0.46.0b1.tar.gz (185 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: llvmlite Building wheel for llvmlite (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for llvmlite (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [46 lines of output] running bdist_wheel C:\Users\User_Niki\venv314t\Scripts\python.exe C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py Trying generator ('Visual Studio 17 2022', 'x64', 'v143') Running: cmake -G Visual Studio 17 2022 -A x64 -T v143 C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\dummy Traceback (most recent call last): File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 198, in main()

File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 188, in main
main_windows()
~~~~~~~~~~~~^^
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 163, in main_windows
generator = find_windows_generator()
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 130, in find_windows_generator
try_cmake(cmake_dir, build_dir, *generator)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User_Niki\AppData\Local\Temp\7\pip-install-hp1qa3xs\llvmlite_8c11503a66174cef9d9dcdd93c04fe8b\ffi\build.py", line 95, in try_cmake
subprocess.check_call(args)
~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 414, in check_call
retcode = call(*popenargs, **kwargs)
File "C:\Program Files\Python314\Lib\subprocess.py", line 395, in call
with Popen(*popenargs, **kwargs) as p:
~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 1038, in init
self._execute_child(args, executable, preexec_fn, close_fds,
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pass_fds, cwd, env,
^^^^^^^^^^^^^^^^^^^
...<5 lines>...
gid, gids, uid, umask,
^^^^^^^^^^^^^^^^^^^^^^
start_new_session, process_group)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Program Files\Python314\Lib\subprocess.py", line 1552, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
# no special security
^^^^^^^^^^^^^^^^^^^^^
...<4 lines>...
cwd,
^^^^
startupinfo)
^^^^^^^^^^^^
FileNotFoundError: [WinError 2] Не удается найти указанный файл
error: command 'C:\Users\User_Niki\venv314t\Scripts\python.exe' 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
Failed to build llvmlite
error: failed-wheel-build-for-install

× Failed to build installable wheels for some pyproject.toml based projects
╰─> llvmlite
(venv314t) PS C:\Users\User_Niki\venv314t> python.exe
Python 3.14.0 free-threading build (tags/v3.14.0:ebf955d, Oct 7 2025, 10:13:09) [MSC v.1944 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.

exit
(venv314t) PS C:\Users\User_Niki\venv314t>

I'm getting this exact same error when trying to install numba 0.45 on a Python .venv, either with uv or pip I get the error FileNotFoundError: [WinError 2] The system cannot find the file specified when Popen tries to find the Python executable although I have already checked that the executable exists in the given directory. For me it looks like this:

        File "C:\Users\anmar\AppData\Roaming\uv\python\cpython-3.14.0-windows-x86_64-none\Lib\subprocess.py", line 1552, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
                                   # no special security
                                   ^^^^^^^^^^^^^^^^^^^^^
          ...<4 lines>...
                                   cwd,
                                   ^^^^
                                   startupinfo)
                                   ^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      error: command 'C:\\Users\\anmar\\AppData\\Local\\uv\\cache\\builds-v0\\.tmpvHxnqv\\Scripts\\python.exe' failed with exit code 1

I have already checked that python.exe exists in that path at the time the command runs, and it's a proper executable, not a symlink or a shorcut.

I'm not sure if it's a problem in the subprocess package or in llvmlite src/ffi/build.py that is calling it, but it's annoying that I cannot properly install numba in Python 3.14 because llvmlite fails to build

toni-neurosc avatar Nov 04 '25 11:11 toni-neurosc

Image

nikimagic avatar Nov 04 '25 12:11 nikimagic

I'm getting this exact same error when trying to install numba 0.45 on a Python .venv, either with uv or pip I get the error FileNotFoundError: [WinError 2] The system cannot find the file specified when Popen tries to find the Python executable although I have already checked that the executable exists in the given directory. For me it looks like this:

        File "C:\Users\anmar\AppData\Roaming\uv\python\cpython-3.14.0-windows-x86_64-none\Lib\subprocess.py", line 1552, in _execute_child
          hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
                             ~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
                                   # no special security
                                   ^^^^^^^^^^^^^^^^^^^^^
          ...<4 lines>...
                                   cwd,
                                   ^^^^
                                   startupinfo)
                                   ^^^^^^^^^^^^
      FileNotFoundError: [WinError 2] The system cannot find the file specified
      error: command 'C:\\Users\\anmar\\AppData\\Local\\uv\\cache\\builds-v0\\.tmpvHxnqv\\Scripts\\python.exe' failed with exit code 1

I have already checked that python.exe exists in that path at the time the command runs, and it's a proper executable, not a symlink or a shorcut.

I'm not sure if it's a problem in the subprocess package or in llvmlite src/ffi/build.py that is calling it, but it's annoying that I cannot properly install numba in Python 3.14 because llvmlite fails to build

@toni-neurosc : 0.45 does not support 3.14. No binary wheels for 3.14 are available and so you are trying to install from source. Why that fails, I have no idea. I recommend trying the recent beta releases that do support 3.14 (but not 3.14t!):

https://numba.discourse.group/t/ann-numba-0-63-0b1-llvmlite-0-46-0b1-python-3-14-support/3068

Lastly, you can keep up with the 3.14 support of the Numba/llvmlite stack at: https://github.com/numba/numba/issues/9957

Hope that helps?

esc avatar Nov 04 '25 16:11 esc

Image

@nikimagic this is still llvmlite 0.46.0b1 installation failing on 3.14t?? Or is there something else you wanted to bring our attention to?

esc avatar Nov 04 '25 16:11 esc

Yes, venv314t, Python 3.14t. Windows server 2025.

Numpy Torch 2.10 nighly (2.8 t version) Matplotlib Pyzmq Jupyter Spyder Pandas 3.0 dev ( t version)

All venv314t work.

Image

nikimagic avatar Nov 04 '25 22:11 nikimagic