[issue2943] Distutils should generate a better error message when the SDK is not installed

Matt Hickford report at bugs.python.org
Wed Jul 24 11:00:44 CEST 2013


Matt Hickford added the comment:

( Upstreamed from Pip https://github.com/pypa/pip/issues/942 )

There are lot of Python users on Windows. If they succeed in installing a package manager (a struggle), this is typically their first experience with it

    $ pip install numpy

    blah blah blah

    Error: Unable to find vcvarsall.bat

The misery is compounded by the cryptic error message. They don't know whether the problem with their computer, the specific package, or pip generally. Let alone how to fix it.

You and I know this happens because the package install involves building some C code from source and the user doesn't have a C compiler installed. The fix is to install mingw32 (or Visual Studio) and edit distutils.cfg to specify to use that compiler. 

Thus, it would be really helpful to print a message after 'error: unable to find vcvarsall.bat' such as

> Installing this package requires a C compiler. To fix this error, follow http://stackoverflow.com/q/2817869/284795

----------
nosy: +Matt.Hickford

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2943>
_______________________________________


More information about the Python-bugs-list mailing list