在msys2上使用Python

版本选择

MINGW - Windows native applications

MSYS2 - POSIX applications emulated to work in Windows

MINGW refers to executables that are compiled using the MINGW GCC Compiler and target the Win32 API. MSYS2 refers to executables that are compiled by MSYS2 GCC Compiler and make use of a POSIX emulation layer.

I understand as a user this can be confusing, why do you care which compiler and API Python is compiled against? Well some programs you may want to make use of, are dependent on running in a POSIX environment. It would be very hard and time consuming to port these applications to Windows. In these cases, MSYS2 provides an emulation layer to allow these applications to work. Unfortunately, making use of this emulation layer is very very slow.

So in general, if you can use the MINGW version of Python, you should because it will be much faster. But if you are trying to run a Python application that depends on being in a POSIX environment, then MSYS2 provides an emulation layer to help make it work.