Luca838
Luca838

Reputation: 47

Unable to install awscli with pip3

This is the error i get when I try to install awscli with pip3 (version 10.0.1).

Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'ProtocolError('Connection aborted.',
OSError(0, 'Error'))': /simple/awscli/
Could not find a version that satisfies the requirement awscli (from versions: )
No matching distribution found for awscli

When I try the below command I get the same error as above:

pip3 install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org awscli

I would appreciate any help. Thanks!

Upvotes: 0

Views: 1836

Answers (1)

jmp
jmp

Reputation: 2385

The issue in this case was that there was another program running locally which was receiving all requests on port 443. The cURL request failed with the error:

Unknown SSL protocol error in connection to pypi.org:443 but that was because it was connecting using 127.0.0.1.

 Trying 151.101.0.223... * TCP_NODELAY set * Connected to pypi.org (127.0.0.1) port 443 (#0) * ALPN, offering http/1.1 * Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH * successfully set certificate verify locations: * CAfile: /Users/lillymcleod/anaconda/ssl/cacert.pem CApath: none * TLSv1.2 (OUT), TLS header, Certificate Status (22): * TLSv1.2 (OUT), TLS handshake, Client hello (1): * Unknown SSL protocol error in connection to pypi.org:443 * Curl_http_done: called premature == 0 * Closing connection 0

This post https://superuser.com/questions/1045431/curl-connecting-to-localhost-127-0-0-1-instead-of-destination-ip was helpful in determining which program was running using the following commands:

# Finds the ports receiving requests 
nc -v -w 2 YOUR_DOMAIN_HERE YOUR_PORT_HERE
# Find the applications running on the ports
nettop -nm tcp

Once the application was killed the pip install command worked as expected again.

Upvotes: 1

Related Questions