一千萬個為什麽

搜索

無法從名為botocore.session的Rundeck-No模塊運行AWS CLI命令



從終端一切正常,安裝了botocore

Traceback (most recent call last):
      File "/bin/aws", line 19, in 
        import awscli.clidriver
      File "/usr/lib/python2.7/site-packages/awscli/clidriver.py", line 17, in 
        import botocore.session
    ImportError: No module named botocore.session

 pip install botocore
Requirement already satisfied: botocore in /root/.local/lib/python2.7/site-packages
Requirement already satisfied: jmespath<1.0.0,>=0.7.1 in /root/.local/lib/python2.7/site-packages (from botocore)
Requirement already satisfied: docutils>=0.10 in /root/.local/lib/python2.7/site-packages (from botocore)
Requirement already satisfied: python-dateutil<3.0.0,>=2.1 in /usr/lib/python2.7/site-packages (from botocore)
Requirement already satisfied: six>=1.5 in /root/.local/lib/python2.7/site-packages (from python-dateutil<3.0.0,>=2.1->botocore)

ENV:

SUDO_USER=ja
SUDO_UID=1000
USERNAME=root
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAIL=/var/spool/mail/ja
PWD=/tmp
LANG=en_US.UTF-8
SHLVL=1
SUDO_COMMAND=/bin/su
HOME=/root
LOGNAME=root
LESSOPEN=||/usr/bin/lesspipe.sh %s
SUDO_GID=1000
_=/bin/env

轉載註明原文: 無法從名為botocore.session的Rundeck-No模塊運行AWS CLI命令

一共有 1 個回答:

管理以擺脫錯誤

pip install awscli --force-reinstall --upgrade

然後從rundeck界面:

aws configure set aws_access_key_id default_access_key
aws configure set aws_secret_access_key default_secret_key
aws configure set default.region us-west-2