How to use MinGW's gcc compiler when installing Python package using Pip?
Even though configuration file solves this problem, it's not always an option. I had the same issue for my command line installation process and I was not able to change config files on all the machines and python distributions.
This is my solution:
For mingw32 and packages, which use VC++ as default:
pip install --global-option build_ext --global-option --compiler=mingw32 <package_zip>
For Visual C++ on WinPython, which uses mingw32 as default:
pip install --global-option build_ext --global-option --compiler=msvc <package_zip>