所以我最初在将PyXML添加到Ubuntu13.1时遇到了一些问题。结果是我需要对PyConfig.h文件进行更改,这很痛苦。
最终,系统能够成功地构建PyXML,但是现在,当我尝试从adspygoogle导入AdWordsClient时(它以前工作得很好),我得到了这个错误:
Warning (from warnings module):
File "/usr/local/lib/python2.7/dist-packages/adspygoogle/__init__.py", line 26
warnings.warn('Can\'t import AdWordsClient: %s' % e)
UserWarning: Can't import AdWordsClient: /usr/local/lib/python2.7/dist-packages/_xmlplus/parsers/pyexpat.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
Warning (from warnings module):
File "/usr/local/lib/python2.7/dist-packages/adspygoogle/__init__.py", line 31
warnings.warn('Can\'t import DfaClient: %s' % e)
UserWarning: Can't import DfaClient: /usr/local/lib/python2.7/dist-packages/_xmlplus/parsers/pyexpat.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
Warning (from warnings module):
File "/usr/local/lib/python2.7/dist-packages/adspygoogle/__init__.py", line 36
warnings.warn('Can\'t import DfpClient: %s' % e)
UserWarning: Can't import DfpClient: /usr/local/lib/python2.7/dist-packages/_xmlplus/parsers/pyexpat.so: undefined symbol: PyUnicodeUCS2_DecodeUTF8
Traceback (most recent call last):
File "<pyshell#0>", line 1, in <module>
from adspygoogle import AdWordsClient
ImportError: cannot import name AdWordsClient现在,当我卸载PyXML并空闲重启时,导入工作正常,非常感谢。
太困惑了!
发布于 2013-11-23 07:25:37
adspygoogle似乎为与您不同的平台构建了一个.so。也许它是64位的,而你使用的是32位?你是怎么安装这个包的?PIP刚刚在我的10.8mac和我的CentOS 6.2机器上正确地安装了adspygoogle和PyXML-0.8.4。
https://stackoverflow.com/questions/20153968
复制相似问题