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?
If you get a "SyntaxError: invalid syntax" when trying to install a module using pip , make sure to run the command from your shell, e.g. bash or PowerShell, and not by running a Python file that contains the pip install your_module command.
The python pip invalid syntax error is occurring because pip is run from the command line, not the Python interpreter. It is a program that installs modules, so you can use them from Python. Once you have installed the module, then you can open the Python shell and do import selenium.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With