问题
In my root environment I run
$ jupyter notebook
and in the browser, click on the 'Conda' tab. This always used to list my conda environments and the packages in them. Now I'm greeted by the following error.
I recently created and deleted some conda environments, maybe that is relevant. The only console output is
[W 10:30:20.948 NotebookApp] 404 GET /environments?_=1476811818902 (::1) 13.19ms referer=http://localhost:8888/tree
[W 10:30:20.951 NotebookApp] 404 GET /packages/available?_=1476811818903 (::1) 1.77ms referer=http://localhost:8888/tree
回答1:
See this issue: https://github.com/Anaconda-Platform/nb_conda/issues/23
The issue seems to be a conflict between the notebook config file in the conda environment and the config file in the users directory.
To fix the issue and get the tab to display properly the content, I had to remove that file:
rm jupyter_notebook_config.json in ~/.jupyter
Note that, for me, that was not an issue as it did not really contain anything.
回答2:
As pointed out at: https://github.com/Anaconda-Platform/nb_conda/issues/23#issuecomment-239813091
The following command helped in resolving the issue:
jupyter serverextension disable nb_conda
jupyter serverextension enable nb_conda
This basically rewrites the config file in the ~/.jupyter folder.
回答3:
On windows, running conda install -c conda-forge nb_conda_kernels worked for me.
回答4:
If no of the commands work for you, try adding kernels manually for each of the environments (as pointed out by Andreas Mueller):
source activate <my_environment>
python -m ipykernel install --user --name <my_environment> --display-name "<Display name>"
来源:https://stackoverflow.com/questions/40114639/jupyter-conda-tab-an-error-occurred-while-retrieving-package-information