Skip to content
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

GitHub's ubuntu-24.04 runner has PEP 668 enabled, which breaks current pip setup #252

Closed
vinchatl opened this issue Aug 7, 2024 · 3 comments

Comments

@vinchatl
Copy link

vinchatl commented Aug 7, 2024

I tried to switch to ubuntu-24.04 to get newer version of gcc and clang compilers, but unfortunately this GitHub runner has PEP 668 enabled.

This means pip can't install python packages system-wide anymore, and needs to setup a virtual environment in which the packages are downloaded and installed.

Here's the output of the fail:

> /usr/bin/sudo apt-get update
**runs fine**

> /usr/bin/sudo apt-get install build-essential libgl1-mesa-dev libgstreamer-gl1.0-0 libpulse-dev libxcb-glx0 libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-randr0 libxcb-render-util0 libxcb-render0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 libxcb-xfixes0 libxcb-xinerama0 libxcb1 libxkbcommon-dev libxkbcommon-x11-0 libxcb-xkb-dev libxcb-cursor0 -y
**runs fine**

> /usr/bin/python3 -m pip install setuptools wheel py7zr==0.20.*
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try apt install
    python3-xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a non-Debian-packaged Python package,
    create a virtual environment using python3 -m venv path/to/venv.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    sure you have python3-full installed.
    
    If you wish to install a non-Debian packaged Python application,
    it may be easiest to use pipx install xyz, which will manage a
    virtual environment for you. Make sure you have pipx installed.
    
    See /usr/share/doc/python3.12/README.venv for more information.

note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
hint: See PEP 668 for the detailed specification.
Error: Error: The process '/usr/bin/python3' failed with exit code 1

I'll try to downgrade the python version, but I believe this is linked to the ubuntu version and not python version.

So this action is basically broken on ubuntu-24.04 for now. 😢

@vinchatl
Copy link
Author

vinchatl commented Aug 7, 2024

Btw my configuration is

    version: 6.5.3
    host: linux
    target: desktop
    arch: gcc_64
    install-deps: true
    cache: false
    cache-key-prefix: install-qt-action
    add-tools-to-path: true
    set-env: true
    no-qt-binaries: false
    tools-only: false
    aqtversion: ==3.1.*
    py7zrversion: ==0.20.*
    source: false
    documentation: false
    examples: false

@pzhlkj6612
Copy link
Contributor

@vinchatl
Copy link
Author

Thanks for the links @pzhlkj6612 !

As suggested in #239 (comment), removing the setup-python: 'false' configuration solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants