Proxy settings for python pip in a corporate environment don't work (for example, Python 3.7.5 is OK, but 3.7.6 is NG)

About what

As the title says.

What kind of person is the article for?

Since it is from within the company, pip recognizes that there is a proxy setting, A person who unexpectedly encounters an error even though he has set a proxy.

Specifically, the following error.

ip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme
raise ProxySchemeUnknown

The following is an error that was forcibly reproduced at home, so It may not be strict. .. ..

    conn = self.get_connection(request.url, proxies)
  File "C:\Users\XYZZZ\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\requests\adapters.py", line 309, in get_connection
    proxy_manager = self.proxy_manager_for(proxy)
  File "C:\Users\XYZZZ\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\requests\adapters.py", line 199, in proxy_manager_for
    **proxy_kwargs)
  File "C:\Users\XYZZZ\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 470, in proxy_from_url
    return ProxyManager(proxy_url=url, **kw)
  File "C:\Users\XYZZZ\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_vendor\urllib3\poolmanager.py", line 420, in __init__
    raise ProxySchemeUnknown(proxy.scheme)
pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme httpyy

Conclusion

Due to the difference in minor versions of python, an error may occur due to the difference in proxy setting method. Specifically, I get an error in Python 3.7.6.

http:

It will be solved if you add. (You can also go back to Python 3.7.5.) ** I feel a little terrible. ** **

Information can be found on the following github. Python 3.7.6: urllib3.exceptions.ProxySchemeUnknown #5297

Recommended Posts

Proxy settings for python pip in a corporate environment don't work (for example, Python 3.7.5 is OK, but 3.7.6 is NG)
Set a proxy for Python pip (described in pip.ini)
Work in a virtual environment with Python virtualenv.
It is blocked by Proxy, a connection error occurs in Python or pip, and it is retried.
Building a development environment for Android apps-creating Android apps in Python
Pip install in proxy environment
Create a Python environment for professionals in VS Code on Windows
How about Anaconda for building a machine learning environment in Python?
A memo for when pip3 is installed with python2.7 for some reason
Inject is recommended for DDD in Python
Let's create a virtual environment for Python
[Mac] Building a virtual environment for Python
Get a token for conoha in python
Building a Python development environment for AI development
A complete guidebook to using pyenv, pip and python in an offline environment