【MiniConda】安装与配置

该博客详细介绍了如何通过清华大学开源软件镜像站下载并安装Miniconda,包括设置安装路径、配置环境变量和验证安装。此外,还提供了conda环境的创建、删除、激活与切换,以及安装和搜索包的步骤。特别提到了使用清华镜像源加速包的下载,并给出了清除索引缓存的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

参考B站UP主:济北周南,有视频有文档,比我详细。

下载方式

  1. 清华大学开源软件镜像站,需要自己选择安装路径和勾选环境变量
  2. winget search miniconda

验证是否安装成功conda -V

配置

anaconda | 镜像站使用帮助 | 清华大学开源软件镜像站

  1. Win+R打开cmd,在命令行输入conda init cmd.exe
  2. 退出再次进入,生成.condarc,可使用conda config --set show_channel_urls yes
  3. 找到.condarc文件,把内容改成
channels:
  - defaults
show_channel_urls: true
default_channels:
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  1. 清除索引缓存 conda clean -i

创建环境

  • 查看当前所有环境 conda info -e
  • 查看当前环境安装的包名 conda list
conda create -n tersorflow python=3.8
conda info -e

删除环境

发现tensorflow拼错了,不想要了。

conda remove -n tersorflow --all

激活环境

conda activate tensorflow

切换回base

conda activate base

或者

conda deactivate

安装包

conda install tensorflow=2.2 cudatoolkit=10.1 cudnn

就像解方程x+y+z=1一样,x和y知道了,z就知道了。

但是Amd不能装tensorflow-gpu

pytorch需要去官网复制

搜索包

conda search tensorflow
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值