一、下载安装包
1.1、miniconda下载地址
Miniconda — Conda documentation
1.2、anaconda下载地址
Anaconda | Anaconda Distribution
1.3、建议链接
官网可能网速比较差,建议用清华源:
(1)miniconda:
Index of /anaconda/miniconda/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
(2)Anaconda
Index of /anaconda/archive/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
这里我是linux系统,下载下来是个sh文件,windows下载下来是exe文件;
linux可以使用wget命令下载,wget {url地址};
我的安装包位于:
###安装包地址
/data/Miniconda3/Miniconda3-py39_4.11.0-Linux-x86_64.sh
二、安装
2.1、cd 到安装包路径下;
cd /data/software/
2.2、bash 安装或者./
bash Miniconda3-py39_4.11.0-Linux-x86_64.sh
2.3、具体步骤
Welcome to Miniconda3 py39_4.11.0
In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
出现这个界面,一直按着enter键;
The following packages listed on https://www.anaconda.com/cryptography are included in the repository a
ccessible through Miniconda that relate to cryptography.
Last updated June 24, 2021
Do you accept the license terms? [yes|no]
输入yes
Miniconda3 will now be installed into this location:
/root/miniconda3
- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below
[/root/miniconda3] >>>
可以默认安装在软件默认的地址下,也可以指定路径,输入指定的路径地址,继续
Do you wish the installer to initialize Miniconda3
by running conda init? [yes|no]
这里我输入的yes;
安装完毕,输入conda命令,可能提示conda: command not found;
用vim 或者vi 打开 bashrc文件
vim ~/.bashrc
在文件最后加入 命令export PATH=$PATH:(你的安装路径)/bin,比如我的安装路径是/data/miniconda3 ;
export PATH=$PATH:/data/miniconda3/bin
保存bashrc文件;
输入conda -V试试,如果显示conda版本号,则表明安装成功!
如果不成功,reboot重启下应该就ok了!
三、源配置
一般官网的源比较慢,建议配置国内源;
这里配置的是清华源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes
如果需要pytorch,可以加上
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud//pytorch/
彩蛋
更多精彩干货内容请关注公众号SLearningAI,欢迎CSDN与公众号同步交流^_^