I was trying to install certain Python packages on a new system I was getting the following error:
error: Unable to find vcvarsall.batI don't use visual studio, instead I use MinGW, so the following steps were needed:
- Install MinGW
- Add the path to the MinGW bin folder to the system path
- Edit or create the distutils.cfg located in your PYTHON\Lib\distutils folder
- Add the following to the cfg file
I also got the following error
gcc: error: unrecognized command line option '-mno-cygwin'There is probably a better solution but until I can find one I edited the '-mno-cygwin' switch out of the cygwinccompiler.py file. It shows up on 4 lines around line 322.
error: command 'gcc' failed with exit status 1
Edit 4/27/15: It looks like the -mno-cygwin issue has been resolved in more recent releases of distutils.