我有一组使用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发布于 2016-12-02 00:32:28
我不知道这是否会具体地解决你的问题,但是我有一个类似的问题,我在谷歌上搜索并在这里找到了我。对于来自google的人来说,问题出在pip安装上,修复方法是:
您需要安装它,您应该在web上找到文件PyXML-0.8.4.tar.gz,然后运行:
pip install the PyXML tarball发布于 2017-01-26 02:34:52
尽管我给出了另一个解决方案,看起来你使用的是一个不稳定的cygwin,但我认为真正的问题在那里,而不是在PyXML包中。
尝试重新安装cygwin或者:尝试从here使用windows安装程序安装Pyxml
https://stackoverflow.com/questions/4665535
复制相似问题