Pyxml是一个早在04年停止维护的项目了,只支持到2.4,我从官网上down下0.8.4版本setup.py build,结果error: Unable to find vcvarsall.bat。网上找解决办法还得下个mingw,否则就得VS2005以上的版本,这样机子上只有VC6.0的我情何以堪那。
于是上网搜解决办法:
这位老大告诉我:PyXML is dead project – warning: PyXML does not work with Python2.6
有点泄气,不过可哪能放弃呢,于是继续找,终于找到一个oddguy的blog:
Windows Installer for PyXML 0.8.4 for Python 2.6.x and Python 2.7.x
哇塞,太帅气了,尤其博文也写得很逗:
Rambling Version
So you are a Windows user and you want to install Python/XML (A.K.A. PyXML), but there is no version on Sourceforge since November 2004, when Python 2.4 was all the rage. It isn’t being maintained any more.
So you turn to your Python friends, and they say “Oh don’t use that. There are much better XML libraries now.” And you say “But the library I want to use uses ZSI which uses PyXML, and ZSI isn’t being maintained either.”
And your Python friends say “ZSI? Are you using SOAP? 2001 just called and they want their over-hyped protocol stack back.” And you say “Yeah, but I need to access a server that only provides SOAP, and someone has written a wrapper layer to it which, surprise, surprise, is no longer being maintained. Besides, the whole ‘the past called’ gag is a bit dated too, isn’t it?”
So they say “Ah, just install it with easy_install” and you look at them funny, because you are a Windows programmer, and they are Linux programmers, and that’s not the way you do things around here.
Either you decide to give it a go, or you decide to download the source directly and run ‘setup.py build’, and either way it complains about ‘vcvarsall.bat’ being missing, which is its way of saying “How am I supposed to compile this C code? Don’t you have Microsoft Visual Studio installed?” to which you say “No, I am a Python programmer now! The eighties called, and asked for their C compiler back, and I gave it to them.” but it isn’t listening to you, and neither are your Linux friends, because they don’t want to associate with someone who doesn’t have a C compiler built in to the operating system.
Maybe you discover at this point that you can actually run a lot of ZSI without the C parts of PyXML. You can just install the non-C parts. This worked for me for almost a month, but eventually it came across some XML that needed the C code and it fell over.
Then you hear a rumour about a free Visual Studio command-line compiler, and a free C compiler called gcc or MINGW or something. Sounds too hard, so you yell in frustration “All I want is a nice Windows installer with pre-built binaries? Hasn’t anyone on the internet built one for me?” and your Linux friends who were pretending they couldn’t hear you finally turn around and say “Wait, you are going to run a binary you just found somewhere on the net? Are you crazy? It could have all sorts of nasty code in there.” and you just look at them funny because that’s just the way you do things around here.
If this is you, I have a solution! I have built the PyXML distribution, ready to just install, linked at the top and bottom of this post. If you don’t trust me (and frankly, you shouldn’t), I have provided instructions on how to do it yourself.
需要下载的童鞋,链接如下,感谢外国友人啊: