无论我如何尝试安装aws cli工具,我都始终收到此错误
david@david-desktop:~/.aws$ /usr/bin/aws --version
Traceback (most recent call last):
File "/usr/bin/aws", line 19, in <module>
import awscli.clidriver
File "/usr/lib/python3/dist-packages/awscli/clidriver.py", line 17, in <module>
import botocore.session
ModuleNotFoundError: No module named 'botocore'
Error in sys.excepthook:
我尝试了以下方法:
突触安装-awscli 1.11.13-1ubuntu1〜16.04.0
我必须安装pyenv才能在Ubuntu 16.04上安装python 3.6。我已经使用pyenv将默认设置为python的2.7.12。在运行aws命令之前,我已经使用pyenv尝试了python 3.6.5和2.7.12,两者都得到相同的错误。
然后是序列,不包括我用pip安装botocore和boto3的位置:
pip install awscli
pip install --upgrade awscli
sudo pip install awscli --force-reinstall --upgrade
sudo apt-get remove awscli
pip install --upgrade awscli
sudo apt-get install awscli
然后根据以下说明进行下载:https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-bundle.html
unzip awscli-bundle.zip
sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws