15

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.

Jupyter error box

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
Octavius
  • 1,573
  • 2
  • 12
  • 18
  • Having the same issue on a new install on a recently upgraded Ubuntu 16.04 installation I deleted the entire anaconda and reinstalled (created two env's and got the same result the envs are listed in the change kernel dropdown on a notebook but nothing on the conda page you have snapshotted. Very strange , another new machine of mine with Ubuntu 16.04 is working fine.. – dartdog Oct 22 '16 at 19:04
  • further info: tom@tom-sam:~$ env | grep -e PATH XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0 XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0 DEFAULTS_PATH=/usr/share/gconf/ubuntu.default.path PATH=/home/tom/anaconda3/bin:/home/tom/gce/google-cloud-sdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/tom/Downloads/google_appengine/ MANDATORY_PATH=/usr/share/gconf/ubuntu.mandatory.path NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript COMPIZ_BIN_PATH=/usr/bin/ – dartdog Oct 22 '16 at 19:31

6 Answers6

4

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.

CheTesta
  • 577
  • 4
  • 17
Adrian Klaver
  • 15,886
  • 2
  • 17
  • 28
3

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.

Shubhanshu Mishra
  • 6,210
  • 6
  • 21
  • 23
2

On windows, running conda install -c conda-forge nb_conda_kernels worked for me.

0

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>"
Tomasz Bartkowiak
  • 12,154
  • 4
  • 57
  • 62
0

I replaced for env in info['envs']] by for env in info['envs'] if env != info['root_prefix']] in this pathanaconda3\pkgs\nb_conda-2.2.1-py38_1\envmanager.py and that solve all errors

0

For me I just needed to close the current Jupyter notebook session and start again, then the error disappeared and it was able to load the envs.

Jehad Nasser
  • 3,227
  • 5
  • 27
  • 39