conda
配置代理服务器
conda
配置代理服务器需要在 ~/.condarc
这个文件里配置
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| channels: - https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro/ - defaults show_channel_urls: true custom_channels: conda-forge: https://mirrors.bfsu.edu.cn/anaconda/cloud msys2: https://mirrors.bfsu.edu.cn/anaconda/cloud ssl_verify: false proxy_server: http: https:
|
pip
配置代理服务器
pip
需要在 ~/.pip/pip.conf
这个文件里配置。Linux 的配置文件在 ~/.pip/pip.conf
,Windows 为
- AnaConda:
C:/Users/[Username]/pip/pip.ini
- MiniConda:
C:/Users/[Username]/AppData/Roaming/pip/pip.ini
添加:
1 2 3 4
| [global] index-url = trusted-host = timeout = 120
|
uv
包管理器添加 indexing
在 uv init
初始化本地目录后,修改 pyprojects.toml
添加下面的条目
1 2 3
| [[tool.uv.index]] url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple/" default = true
|