aws (pip) returns invalid syntax

Viewed 5794

I am trying to install Amazon Web Services in pip, with

pip3 install awscli

but I am getting an error when I try to run aws or aws configure in that case:

Traceback (most recent call last):
  File "/usr/local/bin/aws", line 7, in <module>
    from aws.main import main
  File "/usr/local/lib/python3.6/site-packages/aws/main.py", line 23
    print '%(name)s: %(endpoint)s' % {

any clues?

3 Answers

I had the same issue with python 3.6.

This is actually a different package, confusingly named "aws" which is throwing the error: https://github.com/eofs/aws

Make sure you run

pip install awscli

NOT pip install aws

To find out which "aws" package you are calling run:

 which aws

I found going into my python directory and removing the aws.exe fixed this error for me.

Go to this location C:\Users\user.name\AppData\Roaming\Python\Python37\Scripts\

and delete this file aws.exe

Related