[PYTHON] pip install prevents proxy from installing

I'm setting up the environment by trying to touch machine learning. The target configuration is as follows.

When I installed Anaconda and executed the installation from Anaconda Powershell Prompt, when I installed tensorflow, it was Time out.

(base) PS C:\Windows\system32> pip install tensorflow==1.13.1
Collecting tensorflow==1.13.1
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000028CF4E8E860>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tensorflow/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0000028CF4E8E898>, 'Connection to pypi.org timed out. (connect timeout=15)')': /simple/tensorflow/
...

Solution

1. Simply missing proxy settings

Add the following contents to the end of .condarc. .condarc should be in C: \ Users \ username \ by default.

proxy_servers:
    http: http://<user>:<password>@<proxy_host>:<proxy_port>/
    https: http://<user>:<password>@<proxy_host>:<proxy_port>/

Unfortunately it didn't go away.

2. Specified by pip proxy option

If you google with pip proxy etc ... (Omitted below So I tried it

https://qiita.com/samunohito/items/40a03e1464899225e698

 pip install tensorflow==1.13.1 --proxy http://<user>:<password>@<proxy_host>:<proxy_port>

You have now installed!

Reflection

When I say Proxy, I often set it in an environment variable reflexively, and I was addicted to specifying it as follows.

pip install tensorflow==1.13.1 --proxy <user>:<password>@<proxy_host>:<proxy_port>

Exception:
<The following is omitted>

pip._vendor.urllib3.exceptions.ProxySchemeUnknown: Not supported proxy scheme

I'm scared of thinking.

Recommended Posts

pip install prevents proxy from installing
Pip install in proxy environment
Pip install (Windows) under Proxy environment
Proxy error when running "pip install"
sudo pip install
Install from conda-forge
Get data files from elsewhere during pip install
Install pip, pyenv, BeautifulSoup4
Installing packages with pip3
How to install pip
Install python from source
Error with pip install
Install Apache 2.4.41 from source
Install the pip command
Install pip / pip3 on Ubuntu
Install scikit.learn with pip
When pip install fails
Install Jupiter Notebook on Windows with pip in proxy environment
Enable CentOS 6 pip via Proxy
Install ansible from source code
When moss with pip install
Install github repository with pip
Pip install the GitHub repository
Install pyenv from Homebrew, install Python from pyenv
Install Apache Maven (from source)