millisami
millisami

Reputation: 10161

awscli getting started error

I'd already asked this on the AWS official forum on Jan-2 but not any reply. So, I m posting it here again so that I can get the error fixed.


I installed awscli as stated in this page http://docs.amazonwebservices.com/cli/latest/userguide/cli-chap-getting-started.html

And the following is the installation details:

millisami at millisami in ~/Code/face_tester on design ✹
± which python                                                                            
/usr/local/bin/python
millisami at millisami in ~/Code/face_tester on design ✹
± python --version                                                                        
Python 2.7.3
millisami at millisami in ~/Code/face_tester on design ✹
± pip install awscli --upgrade                                                            
Requirement already up-to-date: awscli in /usr/local/lib/python2.7/site-packages
Requirement already up-to-date: botocore>=0.4.0 in /usr/local/lib/python2.7/site-packages/botocore-0.4.1-py2.7.egg (from awscli)
Requirement already up-to-date: six>=1.1.0 in /usr/local/lib/python2.7/site-packages/six-1.2.0-py2.7.egg (from awscli)
Requirement already up-to-date: argparse>=1.1 in /usr/local/lib/python2.7/site-packages/argparse-1.2.1-py2.7.egg (from awscli)
Requirement already up-to-date: requests>=0.12.1,<1.0.0 in /usr/local/lib/python2.7/site-packages/requests-0.14.2-py2.7.egg (from botocore>=0.4.0->awscli)
Requirement already up-to-date: python-dateutil>=2.1 in /usr/local/lib/python2.7/site-packages/python_dateutil-2.1-py2.7.egg (from botocore>=0.4.0->awscli)
Cleaning up...
millisami at millisami in ~/Code/face_tester on design ✹
± aws help                                                                                                                      
Traceback (most recent call last):
  File "/usr/local/share/python/aws", line 15, in <module>
    import awscli.clidriver
  File "/usr/local/lib/python2.7/site-packages/awscli/__init__.py", line 18, in <module>
    import botocore.base
ImportError: No module named botocore.base
millisami at millisami in ~/Code/face_tester on design1 ↵ ✹

Since installing the pip its successful, but why that botocore is being reported no such file??

Upvotes: 34

Views: 23751

Answers (5)

mbunch
mbunch

Reputation: 569

Dont forget to configure the awscli tool after install:

brew install awscli

or

pip install awscli

then

aws configure

I had to also:

pip uninstall boto3
pip install boto3=={correct version}

"awscli 1.11.166 has requirement botocore==1.7.24"

Upvotes: 1

Rodel
Rodel

Reputation: 177

I did have the same issue but upgrading awscli via pip/pip3 didn't work for me. The root cause of the issue is basically a conflict between 2 different awscli. Once installed via apt-get install awscli and one installed via pip3 insstall awscli. To solve the issue, I removed thee awscli installed in via apt-get. Doing so will remove the aws binary from /usr/bin/aws so just created a soft link from /usr/loca/bin/aws.

Upvotes: 0

ATG
ATG

Reputation: 1707

I've been having the same problem with similar boto dependencies. I basically ran sudo apt-get install awscli on an AWS EC2 Ubuntu instance and it was totally broken out of the box.

After scratching around for hours, the following seems to have done t'trick:

sudo pip install boto --upgrade
sudo pip install boto3 --upgrade
sudo pip install iso8601
sudo pip install sqlalchemy

Typing aws on the command line after running these commands produced the expected "Usage: ..." message as opposed to a Python stacktrace.

I hope this is helpful to someone else too!

Upvotes: 4

CodeFarmer
CodeFarmer

Reputation: 2708

brew install awscli

If you are using Mac OS. It's working for Sierra

Upvotes: 1

Vishnu Nair
Vishnu Nair

Reputation: 1399

Try this command

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

Upvotes: 73

Related Questions