康达停止工作

Conda stopped working

我正在通过 conda 安装 pymc,它告诉我更新一些文件,所以没问题。然而,在更新之后,它给出了一个 OSError,现在,我无法访问任何 conda build 命令。现在,当我输入任何 conda 命令时,它会给我

-bash: conda: command not found

我检查了 bash_profile 和 .bashrc,它们都有适合 conda 的 PATH,并且通过 conda 安装的大多数模块仍然有效。 运行 python 并检查版本

Python 2.7.11 :: Anaconda custom (x86_64)

查看 ~/anaconda/bin,我发现 conda 文件夹不存在。有没有什么办法解决这一问题?重新安装anaconda是唯一的解决方案吗?

抱歉,我没有任何终端输出,因为我关闭了所有 windows。另外,我没有意识到我是 运行 Jupyter notebook 在后台,但这应该没有问题。 Jupyter 不再运行,并产生错误

[W 01:34:35.979 NotebookApp] Unrecognized JSON config file version, assuming version 1
Traceback (most recent call last):
File "/Users/kaichang/anaconda/bin/jupyter-notebook", line 6, in <module>
sys.exit(notebook.notebookapp.main())
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 595, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/traitlets/config/application.py", line 74, in catch_config_error
return method(app, *args, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 1069, in initialize
self.init_configurables()
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/notebook/notebookapp.py", line 837, in init_configurables
parent=self,
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 19, in __init__
specs = self.find_kernel_specs() or {}
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 129, in find_kernel_specs
self.conda_info = self._conda_info()
File "/Users/kaichang/anaconda/lib/python2.7/site-packages/nb_conda_kernels/manager.py", line 29, in _conda_info
p = subprocess.check_output(["conda", "info", "--json"]
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Users/kaichang/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory

抱歉,我只是不太确定发生了什么。

Looking at the ~/anaconda/bin, I see that the conda folder is not there. Is there anyway to fix this?

为了回答这个问题,您可以尝试覆盖您的 conda 安装:

bash /path/to/Miniconda2-latest-MacOSX-x86_64.sh -bfp /Users/kaichang/anaconda/