3

I cannot get pip3 to work on my ec2 instance. Some research tells me that pip runs on port 3128, which I have opened in my Security Group. I have verified this is working using netcat and telnet.

I don't know if this matters, but it only works if I listen on 0.0.0.0 and not 127.0.0.1 .

Anyway, pip3 cannot install anything. Everything I find online implies I am behind a proxy or corporate firewall, which I am not. Basic ec2 instance, basic pre-configured VPC.

The exact error is the same for all pip packages, but currently I am trying to get xmlsec.

$ pip3 install xmlsec
Collecting xmlsec
  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f86aab4add8>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/xmlsec/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x7f86aab4a860>: Failed to establish a new connection: [Errno 101] Network is unreachable',)': /simple/xmlsec/
^COperation cancelled by user

Has anyone any ideas? Much appreciated.

Cathal
  • 141
  • 1
  • 5
  • I have tried this as root - the same result. I am also running this within a virtualenv. – Cathal Mar 03 '18 at 16:10
  • 2
    Got it - the problem was I didn't have port 443 open, and pip3 runs over HTTPS. – Cathal Mar 05 '18 at 12:40
  • Thanks @Cathal - helped on the Google Compute Engine as well: https://stackoverflow.com/a/50328207/1526703 – Anupam May 14 '18 at 10:48

0 Answers0