Skip to content

Notes of proxy settings for conda, pip, python scripts.

Notifications You must be signed in to change notification settings

wxjiao/Proxy-Settings

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 

Repository files navigation

Proxy-Settings

Notes of proxy settings for conda, pip, python scripts.


Conda

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

Pip

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

Python scripts

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

About

Notes of proxy settings for conda, pip, python scripts.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published