Install python’s C extension compilation environment under windows (solve “error: command’cl.exe’ failed: No such file or directory”)

Following a blog post, fixed in python2: Debugger speedups using cython not found.

The same problem was found in python3.5, where the original python required a VC++ Compiler for the installation (MInGW is also available, and it is generally not recommended to use PIP to install some third-party python libraries, and many extensions written in C required a VC++ Compiler for the installation, otherwise “error: command ‘cl.exe’ failed:” would occur. The most common compiler is Visual Studio C ++.

Compiler VS2008 C++ compiler is required in Python2.7, whereas python3 to 3.4 is compiled using VS2010, and python3.5 is compiled using VS2015.
However, as anyone who has ever installed a bloated IDE like VS knows, it comes bundled with a bunch of Microsoft plug-ins, takes up a lot of C disk space, and starts slowly.
if the computer is configured in a general way, the computer will be very stuck, and generally there is no need to install the entire VS.

For Python 2.7, Microsoft has released the Microsoft Visual C++ Compiler for Python 2.7 directly for download and installation.

For python3.5 you will need to install the Visual C++ Build Tools compiler provided by Microsoft
Download address:
to install, remember to choose Windows SDK 8.1 and 10 SDK, so don’t pack VS2015 can also compiled a package of C code in the PIP.

Read More: