Anaconda 安装后未找到 conda cammand

Anaconda 安装后未找到 conda cammand

我刚刚按照主页上的说明安装了 Anaconda。

  • 下载的安装程序
  • 校验和:
    $ shasum -a 256 ~/Downloads/Anaconda3-2022.10-Linux-x86_64.sh 
    e7ecbccbc197ebd7e1f211c59df2e37bc6959d081f2235d387e08c9026666acd  /home/akil/Downloads/Anaconda3-2022.10-Linux-x86_64.sh
    
  • 安装 Anaconda
    bash ~/Downloads/Anaconda3-2022.10-Linux-x86_64.sh
    
  • 接受所有默认设置,直到最后的欢迎信息。
...
Thank you for installing Anaconda3!

===========================================================================

Working with Python and Jupyter is a breeze in DataSpell. It is an IDE
designed for exploratory data analysis and ML. Get better data insights
with DataSpell.

DataSpell for Anaconda is available at: https://www.anaconda.com/dataspell

但是,我无法使用conda命令。

$ conda init
conda: command not found

Ubuntu 版本:

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.04.1 LTS
Release:    22.04
Codename:   jammy

编辑

./conda init bash输出~/anaconda3

$  cd ~/anaconda3/bin/
$ ./conda init bash

~/anaconda3/bin$ ./conda init bash
no change     /home/akil/anaconda3/condabin/conda
no change     /home/akil/anaconda3/bin/conda
no change     /home/akil/anaconda3/bin/conda-env
no change     /home/akil/anaconda3/bin/activate
no change     /home/akil/anaconda3/bin/deactivate
no change     /home/akil/anaconda3/etc/profile.d/conda.sh
no change     /home/akil/anaconda3/etc/fish/conf.d/conda.fish
no change     /home/akil/anaconda3/shell/condabin/Conda.psm1
no change     /home/akil/anaconda3/shell/condabin/conda-hook.ps1
no change     /home/akil/anaconda3/lib/python3.9/site-packages/xontrib/conda.xsh
no change     /home/akil/anaconda3/etc/profile.d/conda.csh
no change     /home/akil/.bashrc
No action taken.

答案1

昨天我在集群中安装 conda 时遇到了同样的问题。

您必须初始化 Conda 才能使用 bash。打开终端并运行

cd anaconda3/bin/
./conda init bash

现在注销/登录或重新启动以加载新的配置。

相关内容