guopengfa
发布于 2021-05-22 / 515 阅读 / 0 评论 / 0 点赞

conda常用命令笔记


# 创建一个名为namepython38,版本为3.8的虚拟环境
conda create -n namepython38 python=3.8

# 在虚拟环境python39中安装pandas
conda install -n python39 pandas

# 在主环境中安装pandas
conda install pandas

# 查看所有环境
conda info -e
conda env list

# 切换到python38虚拟环境
conda activate python38

# 更新当前conda
conda update

# 删除namepython38虚拟环境
conda remove -n namepython38 --all

# 切换到namepython38环境
conda activate namepython38

# 退出namepyton38环境回到base环境
conda deactivate namepython38

# conda添加软件源
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 --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud//pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/
conda config --set show_channel_urls yes

评论