CI fails trying to install `pip` package on `msys2`
minhqdao opened this issue · 2 comments
minhqdao commented
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
zoziha commented
@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 commented
That's correct. And if we take the venv
route, we'd also need to make sure the venv
is properly source
d 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.