When installing a package with pip from Windows under Proxy environment This can be done by using the --proxy option.
python
pip install <package name> --proxy http://xxx.xxx.xxx.xxx:xxxx
※Python 3.5 on Windows7(64bit)
If you need to switch proxies to work in multiple environments, It seems that you should define the proxy of each environment in the environment variable and switch.
【Environment variable】 Proxy-A=http://aaa.aaa.aaa.aaa:aaa Proxy-B=http://bbb.bbb.bbb.bbb:bbbb
【command】
pip install
Switching the Proxy environment variable according to the environment seems to make the operation even easier, but How do you implement it at the command prompt ... (If you use bash, you can control it with .bashrc)
Recommended Posts