Anaconda安装及配置

Anaconda安装

Anaconda官网中找到适合电脑配置的版本安装
具体教程可以参考csdn上的文章

检查安装

在这里插入图片描述
打开开始菜单,会看见已安装的软件
打开Anaconda Prompt
输入

conda --version

在这里插入图片描述

Anaconda换源

如果不换源下载包的速度会很慢

更换清华源

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/
conda config --set show_channel_urls yes

更换科大源

conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/main/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/pkgs/free/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/
conda config --add channels https://mirrors.ustc.edu.cn/anaconda/cloud/menpo/
conda config --set show_channel_urls yes

恢复默认源

conda config --remove-key channels

查看源

conda config --show

创建虚拟环境

python --version #查看Python版本
conda create -n NLP python=3.8  #创建名为NLP的虚拟环境并指定Python版本为3.8

进入虚拟环境并查看配置信息

activate NLP
conda info -e

在这里插入图片描述

查看当前环境下的所有包

conda env list

安装程序包

conda install 包名
conda install numpy #安装numpy包
conda install numpy=1.15.2 #安装版本为1.15.2的numpy包

升级和卸载程序包

conda update 包名 #对现有的包进行升级
conda remove 包名 #卸载包

退出虚拟环境

conda deactivate #退出当前环境,回到最开始的环境

删除创建的虚拟环境

conda remove --name 虚拟环境名 --all
conda remove --name NLP --all #删除创建的NLP环境
  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值