Comments on : Getting Python on MSYS2-MinGW64 Windows subsystem
Neither Windows OS nor the MSYS2-MinGW64 subsystem comes with Python pre-installed. There are at least three possibilities, in this case, that I am aware of.
1) Install Python under MSYS2.
pacman -S python python-pip python-setuptools
In this modality, Python can only be used inside the MSYS2 terminal. You do not need to have Administrator privileges and at the time of writing it will install:
Python 3.8.6 (default, Oct 23 2020, 14:59:35)
[GCC 9.3.0] on msys
2) Install Python under MinGW64
Same as point 1, Administrator privileges are not required. Technically the Python REPL should work inside the Windows command-prompt but you have to manually add the destination folder to the Windows PATH environmental variable.
3) Install Python on Windows.
I found this preferable compared with (1) and (2).
- Get the Windows x86-64 executable from python.org.
- Run the installer as Administrator.
- Remember to select the two checkboxes "pip" and "add python to environmental variables".
In this case, you will need Administrator privileges to complete the installation process but you can freely choose which release to install.
Finally, if you are a VIM user, set the Python 3 dynamic library in the .vimrc file as follows:
set pythonthreedll=~/appdata/local/programs/python/python37/python37.dll