我有一组使用PyXML的python脚本。脚本用于工作正常,但现在我得到错误。
我怎样才能最好地修复此问题?
$ script.py
Traceback (most recent call last):
File "/cygdrive/c/mypath/script.py", line 16, in <module>
from xml import xpath
File "/cygdrive/c/data/code/xml/PyXML-0.8.4/xml/xpath/__init__.py", line 105, in <module>
import Context
File "/cygdrive/c/data/code/xml/PyXML-0.8.4/xml/xpath/Context.py", line 15, in <module>
import CoreFunctions
File "/cygdrive/c/data/code/xml/PyXML-0.8.4/xml/xpath/CoreFunctions.py", line 20, in <module>
from xml.xpath import Util, Conversions
File "/cygdrive/c/data/code/xml/PyXML-0.8.4/xml/xpath/Conversions.py", line 22, in <module>
from xml.utils import boolean
ImportError: cannot import name boolean
然后我尝试重新安装PyXML ..这失败了。
$ easy_install PyXML
Searching for PyXML
Reading http://pypi.python.org/simple/PyXML/
Reading http://www.python.org/sigs/xml-sig/
Best match: PyXML 0.8.4
Downloading http://downloads.sourceforge.net/pyxml/PyXML-0.8.4.tar.gz?modtime=1101741917&big_mirror=0
Processing PyXML-0.8.4.tar.gz
Running PyXML-0.8.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-ZIX2LS/PyXML-0.8.4/egg-dist-tmp-5x8fiU
warning: no files found matching '*.html' under directory 'extensions/expat'
warning: no files found matching '*Makefile' under directory 'extensions/expat'
warning: no files found matching '*.dsp' under directory 'extensions/expat'
warning: no previously-included files matching '*/CVS/*' found anywhere in distribution
69 [main] python 3116 C:\cygwin\bin\python.exe: *** fatal error - unable to remap C:\cygwin\bin\cygcrypto-0.9.8.dll to same address as parent: 0x600000 != 0x910000
Stack trace:
Frame Function Args
00285F18 6102749B (00285F18, 00000000, 00000000, 00000000)
00286208 6102749B (61177B80, 00008000, 00000000, 61179977)
00287238 61004AFB (611A136C, 6124060C, 00600000, 00910000)
End of stack trace
2 [main] python 6800 fork: child 3116 - died waiting for dll loading, errno 11
error: Setup script exited with error: Resource temporarily unavailable
答案 0 :(得分:0)
我不知道这是否会特别解决你的问题,但我有一个类比问题,我用Google搜索并转过身来。 对于任何来自谷歌的人来说,问题在于点子安装和解决方案是:
你需要安装它,你应该在网上找到文件PyXML-0.8.4.tar.gz,然后运行:
pip install the PyXML tarball
答案 1 :(得分:0)
虽然我给出了另一个解决方案,但看起来你使用的是一个不稳定的cygwin,我认为真正的问题就在那里,而不是在PyXML包中。
尝试重新安装cygwin OR: 尝试从here
安装带有Windows安装程序的Pyxml