崔耳又又 发表于 2024-5-25 16:45:37

如何优雅的安装conda

对于很多大佬来说,使用conda是一件非常非常平常的事情,但经常有刚刚入门生信的小伙伴被conda绕的云里雾里。所以,conda是什么、为什么用conda、怎么装conda就显得尤为重要。在这里我用最简单的话来教给大家conda如何安装。

# 1 安装包下载

conda安装时完全免费,大家可以直接去conda官网下载安装包,官网地址如下:

[https://docs.anaconda.com/free/miniconda/miniconda-other-installer-links/](https://)

大家可以选择需要的版本,我是选择的Linux系统下的python3.11版本。

!(data/attachment/forum/202405/25/162937rh1zbm1kctc1x0ri.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/300 "eec176da2088308e4f82cdd5aa5adbd.png")

也可以在终端命令行中直接输入以下代码,直接下载:

```
wget -c https://repo.anaconda.com/miniconda/Miniconda3-py311_24.4.0-0-Linux-x86_64.sh
```

# 2 conda安装

(1) 下载完成后,在命令行中运行安装包:

```
sh Miniconda3-py311_24.4.0-0-Linux-x86_64.sh
```

(2) 此时会提醒你是否查看“用户许可协议”,直接点击键盘上的“Enter”:

```
Welcome to Miniconda3 py311_24.4.0-0

In order to continue the installation process, please review the license
agreement.
Please, press ENTER to continue
>>>
```

(3) 此时会出现“用户许可协议”,大家直接长按键盘上的“Enter”,直至出现以下信息,确认你是否安装:

```
Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>>
```

(4) 在命令行中输入“yes”:

```
Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>> Please answer 'yes' or 'no':'
>>> yes
```

(5) 此时会确认你是否安装在默认路径(根目录),如确认则点击键盘上的“Enter”,否则输入你的新路径之后点击键盘上的“Enter”

```
Miniconda3 will now be installed into this location:
/home/bfcui/miniconda3

- Press ENTER to confirm the location
- Press CTRL-C to abort the installation
- Or specify a different location below

>>>
```

(6) 开始安装,会提示你是否将conda的“base”环境作为初始环境,直接输入“yes”

```
If you'd prefer that conda's base environment not be activated on startup,
   run the following command when conda is activated:

conda config --set auto_activate_base false

You can undo this by running `conda init --reverse $SHELL`?
>>>
```

(7) 出现以下信息,则为安装完成:

```
==> For changes to take effect, close and re-open your current shell. <==

Thank you for installing Miniconda3!
```
页: [1]
查看完整版本: 如何优雅的安装conda