扫码或点击蓝字关注👉🏻 程旭源,我们一起成长 ...
Part1Conda 环境管理
https://www.anaconda.com/products/individual#Downloads
conda create -n 环境名 python=3.10
conda activate 环境名
conda info -e
或
conda env list
Part2conda 换国内镜像源
1更换清华镜像源示例
channels:
- defaults
show_channel_urls: true
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda config --set show_channel_urls yes
2常用命令
conda config --show
conda config --remove channels
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn。。。/地址见下面
conda config --set show_channel_urls yes
conda config --show channels
conda config --remove channels 源名称或链接
Part3为pip配置国内镜像源
单次生效
pip install 【包名】 -i https://mirrors.aliyun.com/pypi/simple/
配置pip镜像源(永久有效)
-
Windows系统中pip换源:
C:Users电脑用户名pip
[global]
index-url =https://mirrors.aliyun.com/pypi/simple/
-
Linux系统中pip换源:
mkdir ~/.pip
cd ~/.pip
vim pip.conf
# 添加下列内容:
[global]
index-url =https://mirrors.aliyun.com/pypi/simple/
-
Mac中pip换源:
vim ~/.config/pip/pip.conf
# 添加下列内容:
[global]
index-url=https://mirrors.aliyun.com/pypi/simple/
或者:
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
Python资料:
资料持续更新中,加入圈子免费学习。
Python资料示例
anaconda3: https://www.anaconda.com/products/individual#Downloads
[2]
清华镜像源: https://mirror.tuna.tsinghua.edu.cn/help/anaconda/
2023-01-29
2023-01-29
2023-01-07
2022-12-07
“点赞”是喜欢,“在看、分享”是真爱
<
原创文章。转载请注明:
作者:meixi
网址: https://www.icnma.com