Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cannot configure Python 3.5 to use Visual C++ compiler on Windows

When I was using Python 3.4 I used MinGW to compile modules. Unfortunately in 3.5 MinGW support no longer works. I've installed the correct Visual C++ stuff, but pip still tries to use the MinGW compiler and fails.

How do I tell it to use the correct compiler?

like image 840
Schilcote Avatar asked Nov 20 '22 06:11

Schilcote


1 Answers

Try following:

  • Install Visual Studio Community 2015 with C++ checked
  • Make sure environment variable for VS is set
  • In PYTHONPATH\Lib\distutils dir create (or edit) file distutils.cfg with following lines:
[build]
compiler=msvc
like image 143
Mikhail Gerasimov Avatar answered Dec 06 '22 11:12

Mikhail Gerasimov