Those who are having trouble with the following in an environment such as an in-house network via a Proxy server. ① I don't know how to set up via proxy with pip ② I don't know how to set up Jupyter Notebook via proxy ③ I don't know the URL setting value of the proxy. (← I personally fell in love with it)
Know the following information about the proxy. ・ Proxy user ・ Proxy password -Proxy server host -Proxy server port
Launch the Anaconda prompt and do the following
#Proxy URL settings
set HTTPS_PROXY=http://{Proxy user}:{Proxy password}@{Proxy server host}:{Proxy server port}
#Installation library
set INSTALL_LIB_NAME=opencv-python
#pip command
pip install --user %INSTALL_LIB_NAME% --proxy %HTTPS_PROXY%
Launch the Anaconda prompt and do the following
ipython profile create
Because the ipython_config.py file is generated Execute the following command to edit. The file path differs depending on the environment, so the following values are for reference only.
notepad C:\\Users\\USER\\.ipython\\profile_default\\ipython_config.py
The edited part is optional, but to make the corrected part easy to understand, Added to the bottom.
import sys,os,os.path
os.environ['HTTP_PROXY']="http://{Proxy user}:{Proxy password}@{Proxy server host}:{Proxy server port}"
os.environ['HTTPS_PROXY']="http://{Proxy user}:{Proxy password}@{Proxy server host}:{Proxy server port}"
As soon as you know it. ..
http://{Proxy user}:{Proxy password}@{Proxy server host}:{Proxy server port}
https://qiita.com/dyoshiha/items/96dea238afe7bf0acd1b
Recommended Posts