0

So I initially was having issues adding PyXML to Ubuntu 13.1. It turned out I needed to make a change to my PyConfig.h file, which was a pain.

Eventually the system was able to successfully build PyXML but now, when I try to import AdWordsClient from adspygoogle (which was working fine before), I get this error:

    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

Now, when I uninstall PyXML and reboot idle, the import works just fine, thank you very much.

So confused!

4

1 回答 1

0

adspygoogle似乎已经.so为与您所在的平台不同的平台构建了一个。也许它是 64 位的,而您使用的是 32 位?你是如何安装这个包的?PyXML-0.8.4PIP 刚刚在我的 10.8 Mac 以及我的 CentOS 6.2机器上正确安装了 adspygoogle,以及为我正确安装。

于 2013-11-22T23:25:36.640 回答