-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'error: externally-managed-environment' when building source distribution #291
Comments
* Address PyO3/maturin-action@v1 issue in ubuntu 24.04 by pinning to ubuntu 22.04. See PyO3/maturin-action#291 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Updated the GitHub Actions workflow to use `ubuntu-22.04` for Linux jobs, enhancing compatibility and performance. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
See PyO3/maturin-action#291 for more details
See PyO3/maturin-action#291 for more details
To work around PyO3/maturin-action#291.
Can someone explain how this worked in 22.04? I do see in my previous passing runs there was a message |
As I understand it, github actions shipped a change that the default Python is now a system Python, hence not allowing installation into its environment anymore. Does using |
So it's not purely the ubuntu version and which python version it ships with? The breakage definitely tracks with the ubuntu-24.04 image and can indeed be worked around by downgrading from -latest to -22.04. |
They seem to have made that change with the ubuntu-24.04 image, this breaking python change is apparently also the reason the rollout is now on hold: actions/runner-images#10636 |
We encountered this on a macos-latest runner today. Action logs here. We definitely have the latest version of Maturin-action:
We're definitely not using the
AFAICT, Maturin Action only uses
Line 881 in 78d2b0f
|
https://github.com/PyO3/maturin-action/blob/main/.github/workflows/test.yml#L38 Fixes the 0.14.2 and 0.13.0 macOS Python packaging failures. Notice that all these jobs use macOS 14.7. - 0.14.2: https://github.com/spiraldb/vortex/actions/runs/11821278964/job/32936900282 - 0.13.0: https://github.com/spiraldb/vortex/actions/runs/11630848959/job/32391375552 Neither 0.14.0 nor 0.14.1 failed before macOS build. 0.12.0 was the last passing one. It used macOS 14.6: - 0.12.0 https://github.com/spiraldb/vortex/actions/runs/11166071447/job/31039891955 See also: - PyO3/maturin#284 - PyO3/maturin-action#291
Recently I started getting the following error when attempting to build the source distribution:
It looks like the cause is the update of the
ubuntu-latest
runner image toubuntu-24.04
which now ships with python 3.12. One possible fix would be to add--break-system-packages
when installing the packages, though creating a virtual environment would probably be the cleaner solution.In the meantime the problem can be worked around by using the
ubuntu-22.04
image explicitly.Sources:
The text was updated successfully, but these errors were encountered: