安装过程:

1
2
3
https://mirrors.tuna.tsinghua.edu.cn/anaconda/miniconda/Miniconda3-latest-Windows-x86_64.exe
#下载链接~

选择all users —

image-20240507211527543

这里全部勾选。

image-20240507211746825

然后添加环境变量:win+r ->sysdm.cpl 选择高级环境变量;编辑path变量

1
D:\minaconda3\condabin #嗯,要按照安装路径自己改的说

image-20240507212458949

给canda换源:

1
notepad %USERPROFILE%\.condarc

输入下面的内容

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
channels:
- defaults
show_channel_urls: true
channel_alias: https://mirrors.tuna.tsinghua.edu.cn/anaconda
default_channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/pro
- 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
simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud

像修改env保存地方的话:

1
conda config --add envs_dirs D:\miniconda3\envs

最后修改文件权限:?

使用不同版本的python时:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
conda activate base #进入conda bash命令行
#不过在外面创建说是
conda create -n py39 python=3.9
py27
py39
bash
canda env list
conda activate env_name
python
pip install -r requirement.txt
canda deactivate #退出
# 进入py39虚拟环境
conda activate py39
conda deactivate
# 进入base虚拟环境
conda activate base
conda deactivate
#下载命令
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple/