2013-11-22 100 views
0

所以我最初在將PyXML添加到Ubuntu 13.1時遇到問題。事實證明,我需要改變我的PyConfig.h文件,這是一個痛苦。在Ubuntu 13.1上安裝PyXML之後,我無法導入AdWordsClient

最終該系統能夠成功建立的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

adspygoogle似乎已經建立了一個.so爲一個不同的平臺比你。也許它是64位的,而你使用的是32位?你是如何安裝這個軟件包的? PIP剛剛在我的10.8 Mac上以及我的CentOS 6.2盒中安裝了adspygoogle,以及PyXML-0.8.4