Notes of proxy settings for conda, pip, python scripts.
On Windows in cmd
:
set http_proxy=http://your_proxy:your_port
set https_proxy=https://your_proxy:your_port
conda install package
On Linux in bash
:
export http_proxy=http://your_proxy:your_port
export https_proxy=https://your_proxy:your_port
conda install package
For Pip, you can set up the global proxy as Conda above.
Or you can designate the proxy argument in pip
as:
pip install package --proxy=http://your_proxy:your_port
For Python, you can also set up the global proxy as Conda above.
Or just set up in your python scripts as:
import os
proxy = 'your_proxy:your_port'
os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTPS_PROXY'] = proxy
# your code