0

pip install with proxy firewall.

Someone referred me into looking at proxy and how I can put in arguments to get pass the proxy server and install the said python module. One of the link I found suggested I install CNTLM. >> Using pip behind a proxy

This suggestion needs installation which the proxy prevents so is not going to work.

Johnseito
  • 197
  • 1
  • 6
  • 22
  • What error did you see? What arguments did you use with pip? – jgmh Jul 05 '17 at 03:55
  • error that it retry total =4, connect = none, read = none, redirect = none. after connection broken by newconnectionerror. pip._vendor.requests.packages.urllib3.connection.verifiedhttpsconnection object at 0x00000000041592B0>: failed to established a new connection. errno 11004 getaddrinfo failed. Could not find a version that satisfies the requirement. the arguments -- pip install --proxy=https://user@mydomain:port somepackage. but that error was not because of the argument. it was because of **pip install module** in command prompt pointing to script folder. – Johnseito Jul 05 '17 at 04:15
  • Did you already try with `sudo pip --proxy http://web-proxy.mydomain.com install somepackage`, as the most voted answer in your link suggests? Change your proxy accordingly. – jgmh Jul 05 '17 at 04:18
  • change my proxy according to what, and what is mydomain ? I typed it as you have it and I got error message sudo is not recognized as an internal or external command, operable program or batch file. – Johnseito Jul 05 '17 at 04:23
  • You have to change it to your proxy IP address or URL. Forget about sudo, use it as `pip install --proxy=: module` – jgmh Jul 05 '17 at 04:26
  • but how do I know my proxy url and proxy port or ip address ? – Johnseito Jul 05 '17 at 04:34
  • You should ask for it to your network administrator. As a hint, you can check your connections tab in either web browser you are using. If you are lucky enough, you'll find it there. As long as you don't have it, pip won't know how to talk to the outside world. – jgmh Jul 05 '17 at 04:41
  • Ok can I just go to command prompt and find the proxy URL and port rather than ask the administrator. I actually tried it by typing netsh winhttp show proxy and is suppose to show me the proxy address and port but it shows no proxy server. I went to IE and click on internet option and connections and LAN setting. Lan setting do not apply to dialup connections. Choose setting above for dialup connection. Please advise. – Johnseito Jul 05 '17 at 15:51
  • I got the proxy and port from admin. I use syntax pip --http://etc.etc.com:port install module. I get no such option to the URL and port. – Johnseito Jul 07 '17 at 13:52
  • Please be careful with the syntax. In your last post the proxy argument is missing. That's why pip is complaining. – jgmh Jul 07 '17 at 18:04

1 Answers1

0

It worked with me :

pip --proxy http://[user]:[password]@proxy:[port] install module