所以我最初在向Ubuntu 13.1添加PyXML时遇到了问题。原来我需要对我的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并重新启动空闲时,导入工作正常,非常感谢。
太困惑了!
答案 0 :(得分:0)
adspygoogle
似乎为不同的平台构建了.so
。也许它是64位,你使用的是32位?你是怎么安装这个包的? PIP刚刚在我的10.8 Mac以及我的CentOS 6.2包装盒上正确安装了adspygoogle和PyXML-0.8.4
。