天天看點

安裝 AWS Command Line Interface 失敗 Could not find a version that satisfies the requirement awscli安裝 AWS Command Line Interface

版權聲明:本文為 testcs_dn(微wx笑) 原創文章,非商用自由轉載-保持署名-注明出處,謝謝。 https://blog.csdn.net/testcs_dn/article/details/79739281

安裝 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

然後再執行

安裝。

後來又轉到 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