无法安装aws-cli

时间:2019-06-07 13:34:53

标签: amazon-web-services aws-cli

我已经在pip3中安装了aws-cli,但无法运行aws。 如果使用此命令pip3 install awscli --upgrade --user安装它,则会得到类似

的结果
Requirement already up-to-date: awscli in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (1.16.173)
Requirement already satisfied, skipping upgrade: rsa<=3.5.0,>=3.1.2 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (3.4.2)
Requirement already satisfied, skipping upgrade: botocore==1.12.163 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (1.12.163)
Requirement already satisfied, skipping upgrade: PyYAML<=3.13,>=3.10 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (3.13)
Requirement already satisfied, skipping upgrade: docutils>=0.10 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (0.14)
Requirement already satisfied, skipping upgrade: colorama<=0.3.9,>=0.2.5 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (0.3.9)
Requirement already satisfied, skipping upgrade: s3transfer<0.3.0,>=0.2.0 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from awscli) (0.2.1)
Requirement already satisfied, skipping upgrade: pyasn1>=0.1.3 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from rsa<=3.5.0,>=3.1.2->awscli) (0.4.5)
Requirement already satisfied, skipping upgrade: jmespath<1.0.0,>=0.7.1 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from botocore==1.12.163->awscli) (0.9.4)
Requirement already satisfied, skipping upgrade: urllib3<1.26,>=1.20; python_version >= "3.4" in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from botocore==1.12.163->awscli) (1.25.3)
Requirement already satisfied, skipping upgrade: python-dateutil<3.0.0,>=2.1; python_version >= "2.7" in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from botocore==1.12.163->awscli) (2.8.0)
Requirement already satisfied, skipping upgrade: six>=1.5 in /Users/MYNAME/Library/Python/3.7/lib/python/site-packages (from python-dateutil<3.0.0,>=2.1; python_version >= "2.7"->botocore==1.12.163->awscli) (1.12.0)

如果我运行命令aws,则结果为bash: aws: command not found

我试图设置PATH,但是我无法弄清楚aws cli的确切路径。

which python结果/usr/local/bin/python

ls -al /usr/local/bin/python结果

/usr/local/bin/python -> ../Cellar/python/2.7.11/bin/python

我不知道如何在PATH上设置.bash_profile

2 个答案:

答案 0 :(得分:0)

请尝试这个。这也将把awscli更新到最新版本。

sudo pip install awscli --force-reinstall --upgrade

答案 1 :(得分:0)

尝试一下:

sudo pip install awscli

如果在此之后您无法使用aws命令,请尝试在新的终端标签或窗口中