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

CI fails trying to install pip package on msys2 #853

Closed
minhqdao opened this issue Aug 1, 2024 · 2 comments
Closed

CI fails trying to install pip package on msys2 #853

minhqdao opened this issue Aug 1, 2024 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@minhqdao
Copy link
Contributor

minhqdao commented Aug 1, 2024

Description

An error recently appeared while trying to install fypp using pip on msys2. The CI fails with the following error message:

Run pip install fypp
error: externally-managed-environment

× This environment is externally managed
╰─> To install Python packages system-wide, try 'pacman -S
    python-xyz', where xyz is the package you are trying to
    install.
    
    If you wish to install a non-MSYS2-packaged Python package,
    create a virtual environment using 'python -m venv path/to/venv'.
    Then use path/to/venv/bin/python and path/to/venv/bin/pip.

Expected Behaviour

fypp is installed without failing.

Version of stdlib

master

Platform and Architecture

Windows-MSYS2

Additional Information

No response

@minhqdao minhqdao added the bug Something isn't working label Aug 1, 2024
@minhqdao minhqdao self-assigned this Aug 1, 2024
@zoziha
Copy link
Contributor

zoziha commented Aug 14, 2024

@minhqdao, this seems to be caused by changes in Python and Pip. If we insist on using the system-level installation, we can pass the --break-system-packages parameter, such as:

pip install --break-system-packages fypp

Or use the virtual environment venv:

python3 -m venv path/to/venv
source <venv>/bin/activate
pip install fypp

@minhqdao
Copy link
Contributor Author

That's correct. And if we take the venv route, we'd also need to make sure the venv is properly sourced for every subsequent run.

But as you pointed out in #854 (comment), it's probably alright to abandon msystem: msys altogether. I'll merge the PR so the CI stops failing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants