1

Trying to install a package using pip in which the network has a firewall and we needed to set a proxy on the command.

This is the syntax we followed: pip install --proxy=domain\username:passwd@proxy.address:port package_name

But it fails (error message below):

 Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 authenticationrequired'))'

The tricky part is that user's password has an '@' in the middle, I'm wondering if it's messing the syntax (as the system understands the proxy address is right after the first '@').

We tried to escape the @ from the password with: @ and also using %40, and even \%40. None of them worked.

Also tried to SET a variable to pass the proxy URL with the credentials to overcome the command line chars read, but didn't work as well.

Any suggestions?

rdas
  • 20,604
  • 6
  • 33
  • 46
  • if you leave off the username:password@ part of the URL, does it prompt for a un and pw when you run the command? – Triggernometry May 09 '19 at 19:34
  • 2
    https://stackoverflow.com/questions/10050877/url-username-with claims that %40 should work – Barmar May 09 '19 at 19:53
  • Possible duplicate of [URL: Username with @](https://stackoverflow.com/questions/10050877/url-username-with) – phd May 09 '19 at 21:42
  • 1. It doesn't prompt pw and un on the command line, just state the connection error msg 2. %40 should work, indeed. I'm wondering if it's actually the pwd causing trouble. But not sure how to troubleshoot the proxy connection from pip. – user3250439 May 10 '19 at 11:38

1 Answers1

-4

[SOLVED] I had to ask the user to change the password and then it worked out.

  • 2
    To be honest, this can't be the solution. Pip needs to provide a better way for entering username and password. – kaiser Jun 08 '20 at 07:06