Tl;Dr: System Python installed by actions/setup-python is working but not the Python installed by uv.
I made up a simple project to demonstrate this issue: https://github.com/kdeldycke/nuitka-issue-3325
Works with actions/setup-python
This project is a simple CLI compiled to a standalone binary on all major platforms (Ubuntu, macOS and Windows) and 2 different architectures (x86_64 and arm64).
This is performed by a GitHub workflow available at: https://github.com/kdeldycke/nuitka-issue-3325/blob/main/.github/workflows/system-python.yaml
The process works perfectly on all platforms.
Note that in the logs, Nuitka is picking the right Python version from the system:
Nuitka: Starting Python compilation with Nuitka '2.6.4' on Python (flavor GitHub Actions Python), '3.13' commercial grade 'not installed'.
Issue with uv
Now let's modify the working workflow used above, and completely remove the use of actions/setup-python. Instead, we will rely on uv alone to install our target Python version, by invoking:
That new workflow is available at: https://github.com/kdeldycke/nuitka-issue-3325/blob/main/.github/workflows/uv-python.yaml
Here is an explicit highlight of the differences between the two workflows:
$ diff -ru ./.github/workflows/system-python.yaml ./.github/workflows/uv-python.yaml
--- ./.github/workflows/system-python.yaml 2025-02-03 10:49:36
+++ ./.github/workflows/uv-python.yaml 2025-02-03 10:49:36
@@ -6,7 +6,7 @@
jobs:
- system-python:
+ uv-python:
strategy:
matrix:
os:
@@ -19,15 +19,12 @@
continue-on-error: true
steps:
- uses: actions/checkout@v4.2.2
- - uses: actions/setup-python@v5.4.0
- with:
- python-version: "3.13"
- name: Install uv
run: |
python -m pip install "uv == 0.5.28"
- name: Install Nuitka
run: |
- uv --no-progress venv
+ uv --no-progress venv --python 3.13
uv --no-progress pip install "nuitka == 2.6.4"
- name: uv run -m nuitka --version
Despite these differences, I expect no change in the results. But this is not the case as you can see in this run: https://github.com/kdeldycke/nuitka-issue-3325/actions/runs/13151107465
All the Ubuntu builds fail. The binary is still produced on these platforms, but running them ends up with this error message:
my-cli-ubuntu-24.04.bin: error while loading shared libraries: libpython3.13.so.1.0: cannot open shared object file: No such file or directory
Note that in this case, Nuitka properly reports the Python 3.13 flavor as sourced from uv:
Nuitka: Starting Python compilation with Nuitka '2.6.4' on Python (flavor UV-Python), '3.13' commercial grade 'not installed'.
Context
This has been tested with:
- Latest
nuitka: 2.6.4
- Latest
uv: 0.5.28
- Latest Python: 3.13
- Latest
actions/setup-python: 5.4.0
This issue has also been reported at: Nuitka/Nuitka#3325
Tl;Dr: System Python installed by
actions/setup-pythonis working but not the Python installed byuv.I made up a simple project to demonstrate this issue: https://github.com/kdeldycke/nuitka-issue-3325
Works with
actions/setup-pythonThis project is a simple CLI compiled to a standalone binary on all major platforms (Ubuntu, macOS and Windows) and 2 different architectures (
x86_64andarm64).This is performed by a GitHub workflow available at: https://github.com/kdeldycke/nuitka-issue-3325/blob/main/.github/workflows/system-python.yaml
The process works perfectly on all platforms.
Note that in the logs, Nuitka is picking the right Python version from the system:
Issue with
uvNow let's modify the working workflow used above, and completely remove the use of
actions/setup-python. Instead, we will rely onuvalone to install our target Python version, by invoking:That new workflow is available at: https://github.com/kdeldycke/nuitka-issue-3325/blob/main/.github/workflows/uv-python.yaml
Here is an explicit highlight of the differences between the two workflows:
Despite these differences, I expect no change in the results. But this is not the case as you can see in this run: https://github.com/kdeldycke/nuitka-issue-3325/actions/runs/13151107465
All the Ubuntu builds fail. The binary is still produced on these platforms, but running them ends up with this error message:
Note that in this case, Nuitka properly reports the Python 3.13 flavor as sourced from
uv:Context
This has been tested with:
nuitka: 2.6.4uv: 0.5.28actions/setup-python: 5.4.0This issue has also been reported at: Nuitka/Nuitka#3325