Mirror and Proxy Summary

1. Mirror Help

2. Proxy

2.1 pip

pip install command:

1
--proxy http://<usr_name>:<password>@<proxyserver_name>:<port#>

2.2 python

1
2
3
4
5
6
7
import os
proxy = 'http://127.0.0.1:10809'

os.environ['http_proxy'] = proxy
os.environ['HTTP_PROXY'] = proxy
os.environ['https_proxy'] = proxy
os.environ['HTTPS_PROXY'] = proxy

2.3 Linux System

2.3.1 Open your terminal

2.3.2 Type the following command to edit the .bashrc file:

1
nano ~/.bashrc

2.3.3 Adding the following lines to the end of the file:

1
2
export http_proxy='http://127.0.0.1:10809'
export https_proxy='http://127.0.0.1:10809'

2.3.4 Save the file and exit

2.3.5 To apply the changes, run:

1
source ~/.bashrc

3. Tip

Conda generate config file .condarc

1
conda config

Mirror and Proxy Summary
https://www.hardyhu.cn/2023/10/29/Mirror-and-Proxy-Summary/
Author
John Doe
Posted on
October 29, 2023
Licensed under