Clément F
Clément F

Reputation: 3955

Jupyter notebook not trusted

I am using Anaconda to work on a Jupyter notebook which displays "Not Trusted" (see on screenshot below).

enter image description here

What does it mean? Is it a problem? How can I solve it?

Upvotes: 133

Views: 192790

Answers (7)

Anis
Anis

Reputation: 3094

It is a security feature to disable the execution of arbitrary code from untrusted notebooks, without the user's consent. There is a doc page about it: https://jupyter-server.readthedocs.io/en/stable/operators/security.html#security-in-notebook-documents

It won't prevent you from manually running the code, that's actually one way of "trusting" the outputs.

Upvotes: 69

Mauricio Perez
Mauricio Perez

Reputation: 389

For Jupyter lab you can use the command Trust Notebook.

The command line can be accessed via View > Activate Command Palette or with Ctrl+Shift+C.

enter image description here

enter image description here

Upvotes: 12

Chong
Chong

Reputation: 11

Accessing the Jupyter lab using the generated link with token from the Command Prompt helped, this link is something like this http://localhost:8888/lab?token=0479d86d921f46a967e3cbb3237e2c9d3210d342ef0c4ebe, copy and paste it into the address bar of your browser and enter.

Upvotes: 1

Aryan
Aryan

Reputation: 442

Open Notebook in Jupyter -> Click File -> Trust Notebook

Pic

Upvotes: 14

Bohumir Zamecnik
Bohumir Zamecnik

Reputation: 2815

This can also happen when you create a notebook in a docker container with mounted volume (the file is owned by the root user) and then open in in jupyter running on the host machine. Changing file owner to the host user helps.

Upvotes: 8

Vincent Pakson
Vincent Pakson

Reputation: 1949

You can try doing

jupyter trust notebook-name.ipynb

as is stated in the docs.

After that, open the notebook as usual with

jupyter notebook notebook-name.ipynb

Upvotes: 158

Baban Gain
Baban Gain

Reputation: 654

Apart from them,
You can click on "Not Trusted"
and click on "Trust" when confirmation window pops up.

Upvotes: 27

Related Questions