1

I'm trying to install Amazon's awscli onto my mac, and I am running into a few errors that I'm not able to diagnose. I've followed all the steps so far in this link, but when I actually try to install awscli, it gives me the following error:

  Could not find a version that satisfies the requirement awscli (from versions: )
No matching distribution found for awscli

The full trace of what is happening is

bash-3.2$ ./Library/Python/2.7/bin/pip install awscli --upgrade --user
Collecting awscli
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b0d4390>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/awscli/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b0d4890>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/awscli/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b0d4d10>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/awscli/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b0d4d50>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/awscli/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x10b0d4690>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known',)': /simple/awscli/
 Could not find a version that satisfies the requirement awscli (from versions: )
No matching distribution found for awscli

I'm almost 100% sure that there is a connection error to the resource I am trying to install, but since the command comes directly from Amazon, it shouldn't be outdated? Also, I am running pip version 9.0.1, so there shouldn't be an out of date issue.

4
  • This page suggests a more complete path. Can you try that? Commented Jan 3, 2018 at 16:41
  • can you try this command pip install awscli --ignore-installed six Commented Jan 3, 2018 at 17:04
  • Im still having this issue. Any luck on your end? Commented Apr 26, 2018 at 20:46
  • @CBP, this is an issue with your machine, not pip or amazon. I blame the contents of your hosts file: /etc/hosts. Commented Jul 9, 2018 at 19:42

4 Answers 4

3

This worked for me. Hope this helps other people who encounter this issue.

brew install python3    
pip3 install awscli --upgrade --user
Sign up to request clarification or add additional context in comments.

2 Comments

this involves replacing the stock Python with Homebrew Python, and does not address the actual problem in the question
Fair, but I was getting the exact same error as @user3334871 while trying to install the aws cli. This resolved my issue and could potentially unblock others as well.
1

You should be able to follow the other set of instructions there:

https://docs.aws.amazon.com/cli/latest/userguide/cli-install-macos.html

Install the AWS CLI Using the Bundled Installer

Follow these steps from the command line to install the AWS CLI using the bundled installer.

To install the AWS CLI using the bundled installer

Download the AWS CLI Bundled Installer.

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"

Unzip the package.

$ unzip awscli-bundle.zip

Note

If you don't have unzip, use your Linux distribution's built in package manager to install it.

Run the install executable.

$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

Note

By default, the install script runs under the system default version of Python. If you have installed an alternative version of Python and want to use that to install the AWS CLI, run the install script with that version by absolute path to the Python executable. For example:

$ sudo /usr/local/bin/python2.7 awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

The installer installs the AWS CLI at /usr/local/aws and creates the symlink aws at the /usr/local/bin directory. Using the -b option to create a symlink eliminates the need to specify the install directory in the user's $PATH variable. This should enable all users to call the AWS CLI by typing aws from any directory.

To see an explanation of the -i and -b options, use the -h option:

$ ./awscli-bundle/install -h

Comments

0

I have found the easiest way is to just install it with conda;

https://anaconda.org/conda-forge/awscli

You can use some commands like this:

$ wget "https://repo.continuum.io/miniconda/Miniconda3-4.5.4-MacOSX-x86_64.sh"
$ bash "Miniconda3-4.5.4-MacOSX-x86_64.sh" -b -p "${PWD}/conda"
$ source "${PWD}/conda/bin/activate"
(base) $ conda config --add channels conda-forge
(base) $ conda install -y -c conda-forge awscli=1.16.29
(base) $ aws --version
aws-cli/1.16.29 Python/3.6.5 Darwin/16.7.0 botocore/1.12.19

The caveat is that you will need to use this conda installation whenever you need to use the AWS CLI, but its easier than messing with system-wide installations or pip configs, IMO, and conda is more robust than a Python virtual env.

Comments

0

Facing similar error while installing awscli on my mac machine(Mojave version). Followed below steps to resolve it.

  1. Try to install awscli using brew.

    brew install awscli
    
  2. Reference link :

    https://vyspiansky.github.io/2018/03/17/install-aws-cli-on-macos/

    This link helped me. Hope this helps!!.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.