Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

KeyError: 'allow_remote_access' in jupyter notebook in one environment

I can run jupyter notebook without activating environment. Also I can run in under environment py35 I made. But when I try to run it under py36, it fails with

Traceback (most recent call last):
  File "/opt/anaconda3/envs/py36/lib/python3.6/site-packages/traitlets/traitlets.py", line 528, in get
    value = obj._trait_values[self.name]
KeyError: 'allow_remote_access'

During handling of the above exception, another exception occurred:

This can't be solved with editing file in ~/.jupyter, because it works in other envs.

like image 213
Dims Avatar asked Jan 02 '23 12:01

Dims


2 Answers

Just pass manually option --ip with correct IP instead of *:

jupyter notebook --ip="0.0.0.0"

or change in your config file

Details: https://github.com/jupyter/docker-stacks/issues/718

like image 198
Santyago Avatar answered Jan 13 '23 18:01

Santyago


I remember I fixed this point by adding the following change in the config file of jupyter.

Here are the steps :

  1. vi ~/.jupyter/jupyter_notebook_config.py
  2. Insert this : c.NotebookApp.ip = '0.0.0.0'
  3. exit the config file and run jupyter-notebook --no-browser --port=8899 (8899 is the port number, you have to change it ;) )

You can do this whether you worked on the cloud or on your local machine.

like image 44
smerllo Avatar answered Jan 13 '23 19:01

smerllo