安装 AWS Command Line Interface
sudo pip install awscli --upgrade --user
The directory '/Users/aven/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/aven/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting awscli
Could not find a version that satisfies the requirement awscli (from versions: )
No matching distribution found for awscli
按照官方文档:https://docs.aws.amazon.com/zh_cn/cli/latest/userguide/installing.html
使用以下命令安装:
$ pip install awscli --upgrade --user
之前一天尝试就有错误,
以下命令也尝试了:
sudo pip3 install awscli --upgrade --user
得到相同的错误,
但是隔了一天,今天再执行却又可以了,
然而命令执行成功,awscli 却不知道安装到哪里去了,
执行 aws 提示找不到命令。
原来是要升级 pip
sudo pip install --upgrade pip
然后再执行
sudo pip install awscli --upgrade --user
安装。
后来又转到 root 用户下,不加 sudo 安装,
输出都一样:
pip install awscli --upgrade --user
Requirement already up-to-date: awscli in ./Library/Python/2.7/lib/python/site-packages
Requirement already up-to-date: s3transfer<0.2.0,>=0.1.12 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: botocore==1.9.19 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: PyYAML<=3.12,>=3.10 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: rsa<=3.5.0,>=3.1.2 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: docutils>=0.10 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: colorama<=0.3.7,>=0.2.5 in ./Library/Python/2.7/lib/python/site-packages (from awscli)
Requirement already up-to-date: futures<4.0.0,>=2.2.0; python_version == "2.6" or python_version == "2.7" in ./Library/Python/2.7/lib/python/site-packages (from s3transfer<0.2.0,>=0.1.12->awscli)
Requirement already up-to-date: python-dateutil<2.7.0,>=2.1 in ./Library/Python/2.7/lib/python/site-packages (from botocore==1.9.19->awscli)
Requirement already up-to-date: jmespath<1.0.0,>=0.7.1 in ./Library/Python/2.7/lib/python/site-packages (from botocore==1.9.19->awscli)
Requirement already up-to-date: pyasn1>=0.1.3 in ./Library/Python/2.7/lib/python/site-packages (from rsa<=3.5.0,>=3.1.2->awscli)
Requirement already up-to-date: six>=1.5 in ./Library/Python/2.7/lib/python/site-packages (from python-dateutil<2.7.0,>=2.1->botocore==1.9.19->awscli)
命令执行完成,再执行:
aws
依然提示:
-sh: aws: command not found