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:
- Right click on
Computer, and selectProperties - On the left, select
Advanced system settings - Click on the
Advancedtab, then clickEnvironment Variables - Click on
New..underUser Variables - In
Variable name, typeHTTP_PROXYand inVariable value, typehttp://username:password@proxy.com:port(whereproxy.comis the hostname or IP address of your proxy, andportis the port for it - grab it from Internet Explorer) - 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"