Skip to content

Miniconda

安装

shell
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

sh Miniconda3-latest-Linux-x86_64.sh

一路yes即可安装完成,完成后source ~/.zshrc或者source ~/.bashrc生效。

shell
# shell自动加载
conda config --set auto_activate_base false
# 回滚
conda init --reverse $SHELL

初始化环境

创建环境

shell
conda create --name myenv python=3.11

创建后不是默认生效的,需要执行conda activate myenv生效,如果需要默认生效则需要加入到~/.zshrc中:

shell
echo "conda activate myenv" >>~/.zshrc

删除环境

shell
conda remove --name myenv --all

安装包

shell
conda install package_name

更新包

shell
conda update package_name

查看已安装的package

shell
conda list

更新conda

shell
conda update conda