Is it possible to install AWS CLI using Python2.7?

I installed AWS CLI from Python 2.7 using python -m pip install awscli. It seemed to be installing, but then, trying to start aws, I get 'aws' is not recognized as an internal or external command.

The documentation states that I should add the following to PATH:

% USERPROFILE% \ AppData \ Local \ Programs \ Python \ Python36 \ Scripts

But this is for Python3. Where is it installed for Python2? There is %USERPROFILE%\AppData\Local\Programs\nothing (I checked). And does the installation work for Python2 or only for Python3?

+1
source share
2 answers

c:\Python27\Scripts\aws.cmd. aws.cmd, aws.exe. , aws, PATH:

set PATH=%PATH%;c:\Python27\Scripts

:

c:\Python27>aws --version
File association not found for extension .py
aws-cli/1.11.148 Python/2.7.14rc1 Windows/10 botocore/1.7.6

File association not found for extension .py.

: @zwer " , .py", :

assoc .py=Python.File
ftype Python.File=c:\Python27\python.exe "%1" %*
+1

-

  • pip
  • pip awscli
  • aws configure

PIP: YUM, python-pip

#yum install epel-release    
#yum install python-pip

AWSCLI:

#pip install awscli

AWSCLI:

#aws configure
aws_access_key_id=<########>
aws_secret_access_key=<####################>
Default Region[None]: region=us-west-2
format[none]: json

::

~/.ssh/aws/credentials
+1
source

Source: https://habr.com/ru/post/1672380/


All Articles