使用 Anaconda 安装不起作用

数据挖掘 Python 蟒蛇
2022-03-09 14:49:27

我尝试通过终端在我的 Macbook 上安装 PyFerret。我使用终端进入我的用户目录,并从该网站https://anaconda.org/conda-forge/pyferret给它以下命令:

conda install -c conda-forge pyferret
conda install -c conda-forge/label/broken pyferret
conda install -c conda-forge/label/cf201901 pyferret

但是,我注意到我只需要下载其中一个。我尝试使用删除文件

conda remove 
conda uninstall

但他们没有工作。后来我尝试按照该网站 https://github.com/NOAA-PMEL/PyFerret/blob/master/README.md 的说明输入以下命令

conda create -n FERRET -c conda-forge pyferret ferret_datasets --yes

然后它说您可以通过在终端中调用 PyFerret 来使用它

conda activate FERRET

但我得到的回应是

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'.

我尝试使用

conda init -bash

在那之后它有点工作,我可以使用该命令激活 PyFerret,但它只会在我的命令行名称上显示 PyFerrer,我真的不知道发生了什么。

你能指导我如何卸载所有东西吗?如果可能的话,我想了解如何让 PyFerret 也能正常工作。

1个回答

似乎 Conda 一次只能安装一个版本的软件包,因此您使用它的任何安装命令都将替换您可能已安装的任何其他版本。所以我使用 conda 重新安装了它create -n FERRET -c conda-forge pyferret ferret_datasets --yes之后,我能够激活环境conda activate FERRET如果终端抱怨并要求您初始化 shell,conda init bash应该足以让您激活环境。