knowledge-vault/sources/references/开发笔记/Conda/Centos安装Conda.md

32 lines
689 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

你可以使用以下脚本在CentOS上安装Conda
```bash
#!/bin/bash
# 下载最新的Miniconda安装脚本
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O Miniconda3-latest-Linux-x86_64.sh
# 运行安装脚本
bash Miniconda3-latest-Linux-x86_64.sh -b -p $HOME/miniconda
# 初始化Conda
$HOME/miniconda/bin/conda init
# 激活更改
source ~/.bashrc
# 验证安装
conda --version
```
保存上述脚本到一个文件(例如`install_conda.sh`),然后在终端中运行以下命令来执行脚本:
```bash
chmod +x install_conda.sh
./install_conda.sh
```
这将下载并安装Miniconda并将其初始化到你的环境中。