How to change Python default compiler to GCC?

*爱你&永不变心* 提交于 2019-12-11 13:24:36

问题


I have Windows 10 and Python 2.7 installed. When I run IDLE I find this: Python 2.7.10 (default, Oct 14 2015, 16:09:02) [MSC v.1500 32 bit (Intel)]

I want the default compiler here to be MinGW's GCC (I already installed MinGW) becaue I cannot import Theano with the MSC compiler

I tried all the tutorials out there and every time I successfully install Theano but when I try to import it I get the error "Problem occurred during compilation with the command line below:" and I get a huge list of errors. Btw, I don't have VS installed on my system


回答1:


Edit Distutils config file C:\Python2.7\Lib\distutils\distutils.cfg (Create the file if it already does not exist).

Add the following to the file:

[build]

compiler = mingw32

This should work.



来源:https://stackoverflow.com/questions/36189453/how-to-change-python-default-compiler-to-gcc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!