我有運行cli來在Ubuntu 14.04 AWS的一些問題,我不斷收到以下錯誤Pyexpat導入錯誤運行時,AWS CLI
Traceback (most recent call last):
File "/usr/local/bin/aws", line 15, in <module>
import awscli.clidriver
File "/usr/local/lib/python2.7/dist-packages/awscli/clidriver.py", line 16, in <module>
File "/usr/local/lib/python2.7/dist-packages/botocore/session.py", line 27, in <module>
import botocore.credentials
File "/usr/local/lib/python2.7/dist-packages/botocore/credentials.py", line 23, in <module>
from botocore.compat import total_seconds
File "/usr/local/lib/python2.7/dist-packages/botocore/compat.py", line 118, in <module>
import xml.etree.cElementTree
File "/usr/lib/python2.7/xml/etree/cElementTree.py", line 3, in <module>
from _elementtree import *
ImportError: PyCapsule_Import could not import module "pyexpat"
當我做
ls -l /usr/lib/python2.7/*/pyexpat*
我得到
-rw-r--r-- 1 root root 69200 Mar 23 01:57 /usr/lib/python2.7/lib-dynload/pyexpat.x86_64-linux-gnu.so
任何幫助,非常感謝。
編輯
不知何故,問題是,我不得不運行AWS使用sudo命令。
與StarCluster類似的問題和sudo解決了它,謝謝 – 2014-09-29 00:37:12
如果您找到解決方案,請給出反饋。 – 2017-02-22 09:46:04