python - 我无法在 ubuntu 上运行 conda 命令/激活环境?

标签 python bash anaconda ubuntu-16.04 conda

我已经在 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 中。有人可以帮忙吗?

最佳答案

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

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

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

关于python - 我无法在 ubuntu 上运行 conda 命令/激活环境?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47710568/

相关文章:

python - 配置 AWS Cloud9 以使用 Anaconda Python 环境

python - iPython (python 2) - 导入错误 : No module named model_selection

python reduce accum 作为参数

python - Python 3.5 内部类(枚举)中静态/类列表/字典的初始化

xml - 如何在一个相应的列上加入两个单独的文件?

linux - 在远程存储库上使用 'git push -f' 是否会刷新整个文件夹?

tensorflow - 当我激活tensorflow env时,Anaconda提示崩溃

python 不使用更新的 pip scipy 包

linux - 是否有同时适用于 linux 和 mac OS 的命令来确定操作系统版本?

Anaconda:导航器启动时发生意外错误