Ubuntu安装Anaconda3(详细)

下载Anaconda3

  1. 到官网找到适合自己版本的文件
    链接: Anaconda下载页面
  2. 复制要下载的文件名称
    在这里插入图片描述
  3. 在Linux终端输入
wget https://repo.anaconda.com/archive/文件名称
例如:wget https://repo.anaconda.com/archive/Anaconda3-2021.04-Linux-x86_64.sh

会下载文件到当前目录

安装Anaconda3

  1. 先给文件赋权
chmod +x Anaconda3-2021.04-Linux-x86_64.sh
  1. 安装
./Anaconda3-2021.04-Linux-x86_64.sh

需要回车的时候回车即可
看到more以后一直回车会下拉,直到出现yes|no,输入yes
出现MORE,一直回车,直到出现“Anaconda3 will now be installed into this location:”这行字,直接回车



出现下面的图片后
在这里插入图片描述
输入yes,是为了直接添加Anaconda到环境变量,如果添加成功,可以直接到第四步验证

添加环境变量

source ~/.bashrc

检测是否安装成功

anaconda -V
conda -V

在这里插入图片描述

问题:anaconda: command not found

解决:

vim ~/.bashrc
在文件末尾添加:export PATH=~/anaconda3/bin:$PATH
保存退出
source ~/.bashrc

在这里插入图片描述

即可解决

问题2:
安装好 anaconda 之后新建虚拟环境之后激活环境报错

CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run
$ conda init <SHELL_NAME>

Currently supported shells are:
  - bash
  - fish
  - tcsh
  - xonsh
  - zsh
  - powershell
See 'conda init --help' for more information and options.

IMPORTANT: You may need to close and restart your shell after running 'conda init'.
-----------------------------------
Anaconda error:CommandNotFoundError: Your shell has not been properly configured to use 'conda activate'. To initialize your shell
Windows:conda init <SHELL_NAME>
SHELL_NAME 替换成当前的shell名称,比如 Windows 一般是 conda init cmd
Linux:source activate
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

祈盼啦啦啦

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值