error: Python was built with Visual Studio 2003;

用easy_install安装atomisator的时候提示说:
“Python was built with Visual Studio 200*” 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 installed, you can try compiling with MingW32, by passing “-c mingw32″ to setup.py.

手动安装atomisator的时候,还是如此错误, 怪了, 看来只有用mingw32了。
mingw32已经有了,不用担心, build的时候指定mingw32:
python setup.py build -c mingw32
但是install的时候还是无法通过。 而且使用python setup.py install -c mingw32的时候,错误依旧。
在: http://eli.thegreenplace.net/2008/06/28/compiling-python-extensions-with-distutils-and-mingw/
说通过替换libpython25.a可以通过。 这个方法在我这儿行不通。
有可能他是ActiveState ,我使用的是Cpython,有可能问题出在这儿。
还有一个可能就是install的不理会-c mingw32的选项。
郁闷的是没有命令行可以指定这个选项。
难道非要VS?没有办法,下载了免费版的Visual Studio 2008 Express。
用d:Program Files\Microsoft Visual Studio 9.0\VC\vcvarsall.bat 设置了环境变量。
再来easy_install-2.5 atomisator 错误依旧。
最后在:http://www.procoders.net/?p=204 找到法子:
修改setup.cfg,增加:
[build]
compiler=mingw32
然后 easy_install-2.5 atomisator 果然漂亮。
不知道在么两行内容,害得我花了老长时间去下那个近2G的VS 2008 Express。 真是不值。
好在后来 easy_install-265 atomisator 的时候看见:
atomisatorfilterslevenshteinLevenshtein.c(4109) : warning C4244: “=”: 从”double”转换到”size_t”,可能丢失数据
atomisatorfilterslevenshteinLevenshtein.c(4146) : warning C4244: “初始化”: 从”double”转换到”size_t”,可能丢失数据
这个很明显是cl干的。 稍微宽了些心。
最后在:http://www.procoders.net/?p=204 的commets里面看见有人说:
python setup.py build -c mingw32 install
和自定义
%HOME%pydistutils.cfg
都是上好的方法。而且这两个方法看起来更加棒。 而且在:
http://docs.python.org/install/index.html#config-syntax
有非常完整的Python模块安装说明。以后在有什么东西装不上,一个地方就是去这儿看看,
而不是满世界无头苍蝇似的乱转
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值