Skip to content Skip to sidebar Skip to footer

Unable To Configure Python To Proxy

None of the earlier posts related to my question below were able to provide me a solution. So i am posting in a new thread. I connect to the internet thru an authenticated proxy i

Solution 1:

For Windows 7:

  1. Right click on Computer, and select Properties
  2. On the left, select Advanced system settings
  3. Click on the Advanced tab, then click Environment Variables
  4. Click on New.. under User Variables
  5. In Variable name, type HTTP_PROXY and in Variable value, type http://username:password@proxy.com:port (where proxy.com is the hostname or IP address of your proxy, and port is the port for it - grab it from Internet Explorer)
  6. Click OK, then OK, then OK again to dismiss all the dialog boxes.

Now, when you open a new command terminal, Python should be able to access the Internet; and any IDE (once started again), should allow Python to access the Internet.

For Windows XP, when you right click on My Computer and select Properties, you'll reach the same dialog box where you click on the Advanced tab.

Python will read HTTP_PROXY and HTTPS_PROXY enivronment variables (if set) before it tries to connect to the Internet. If you are using a proxy and these variables are missing, any Python application (unless specifically exempted) cannot access the Internet. So, you won't be able to pip install for example - but once you set both of those variables, Python will use the proxy and then will connect to the Internet.

Post a Comment for "Unable To Configure Python To Proxy"