Skip to content

Conversation

@radarhere
Copy link
Member

@radarhere radarhere commented Nov 22, 2024

MinGW has started failing in main - https://github.com/python-pillow/Pillow/actions/runs/11950775623/job/33312968743#step:4:233

error: externally-managed-environment

This environment is externally managed

To install Python packages system-wide, try 'pacman -S
$MINGW_PACKAGE_PREFIX-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.

If you wish to install a non-MSYS2 packaged Python application,
it may be easiest to use 'pipx install xyz', which will manage a
virtual environment for you. Make sure you have $MINGW_PACKAGE_PREFIX-python-pipx
installed via pacman.

pyroma is the only library that we are using that doesn't exist as a MinGW package, and since it's not used by Pillow, but is rather a tool to check Pillow only in our test suite, I think the best solution is to just not install it - using system packages would be closest to what the standard user would do.

Also, https://www.msys2.org/docs/python/ now states

2024-07-01: setuptools now supports building C extensions in MSYS2 since v70.2.0. Previous versions required export SETUPTOOLS_USE_DISTUTILS=stdlib as a workaround.

so the changes from #7131 and #7224 can be removed.

@hugovk hugovk merged commit 09d7543 into python-pillow:main Nov 22, 2024
47 checks passed
@radarhere radarhere deleted the mingw_packages branch November 22, 2024 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants