【问题标题】:I cannot run conda command /activate environment on ubuntu?我无法在 ubuntu 上运行 conda 命令 /activate 环境?
【发布时间】:2017-12-08 08:44:06
【问题描述】:

我已经在ubuntu 中安装了 anaconda,但我遇到了 anaconda 的问题。我在 conda 环境中运行以下命令:

271  pip install --user -r requirements.txt
  272  cd ..
  273  conda install ipython jupyter
  274  conda install jupyter
  275  python
  276  sudo apt-get install python-vtk python-wxgtk2.6 python-setuptools python-numpy python-configobj
  277  sudo apt-get install python-vtk python-wxgtk2.8 python-setuptools python-numpy python-configobj
  278  conda install -c anaconda mayavi==4.5.0

它突然停止工作。一旦我想激活环境或使用conda 运行任何命令,我就会收到以下错误:

ERROR: The install method you used for conda--probably either `pip install conda`
or `easy_install conda`--is not compatible with using conda as an application.
If your intention is to install conda as a standalone application, currently
supported install methods include the Anaconda installer and the miniconda
installer.  You can download the miniconda installer from
https://conda.io/miniconda.html.

我什至将export PATH=/home/user/anaconda2/bin:$PATH 添加到.bashrc。有人可以帮忙吗?

【问题讨论】:

  • 您是如何安装 conda 的,在出现此错误之前您运行了什么命令?
  • 我更新了问题。请看一看。我想安装软件的要求。如果您能提供帮助,我将不胜感激。
  • 你有没有在错误出现之前尝试pip install conda
  • @NikhilFadnis 是的,我刚刚看过历史,是的,我已经完成了
  • 一旦我运行了这个 which conda ,它会显示 bin 目录的路径,但它无法识别任何 conda 命令。

标签: python bash anaconda ubuntu-16.04 conda


【解决方案1】:

pip install conda 可能会破坏 conda 设置。从错误中的路径下载 miniconda setup 并在下面运行

bash Miniconda3-latest-Linux-x86_64.sh -f

要测试您的安装,请输入命令conda --version。如果安装正确,您将看到已安装的 conda 版本。

【讨论】:

  • 感谢您的评论。一个问题是它会破坏我在 anaconda 中的环境吗?
  • 确保重新安装在与以前相同的路径上,以便仅替换核心 conda 文件。
  • 非常感谢您的帮助
猜你喜欢
  • 1970-01-01
  • 2017-10-03
  • 2020-12-06
  • 1970-01-01
  • 2023-03-16
  • 1970-01-01
  • 2019-08-24
  • 2021-04-11
  • 2020-12-13
相关资源
最近更新 更多