您的位置:首页 > 编程语言 > Python开发

python error when compile file in windows

2010-07-29 23:19 585 查看
It is a common problems when compile some source file in python. The error message is as followed:
error: Python was built with Visual Studio 2003;
extensions must be built with a compiler than can generate compatible binaries.
Visual Studio 2003 was not found on this system. If you have Cygwin installled,
you can try compiling with MingW32, by passing "-c mingw32" to setup.py.

There is some solution for this, for example, make a static .lib file for yourself. But if cygwin is installed, you can create a cfg in "C:\Python25\Lib\distutils" named as distutils.cfg, and input the following content:
[build]
compiler=mingw32

this will change the default compiler from visual studio to gcc and finish the install process.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐