简体   繁体   中英

Jupyter asks an unknown password

I recently installed Anaconda (2.7) distribution on a linux box. As you may know, it includes Jupyter notebook server.

My problem is that Jupyter requires a password I don't know. Observe what happens:

$ jupyter notebook
[W 04:12:51.684 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 04:12:51.702 NotebookApp] JupyterLab alpha preview extension loaded from /home/poko/Software/anaconda2/lib/python2.7/site-packages/jupyterlab
JupyterLab v0.27.0
Known labextensions:
[I 04:12:51.703 NotebookApp] Running the core application with no additional extensions or settings
[I 04:12:51.705 NotebookApp] Serving notebooks from local directory: /home/poko/courses/deeplearning1/nbs
[I 04:12:51.705 NotebookApp] 0 active kernels 
[I 04:12:51.705 NotebookApp] The Jupyter Notebook is running at: http://[all ip addresses on your system]:8888/
[I 04:12:51.705 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

My browser (either from localhost or across the internet, displays:

浏览器

It should be noted that:

a) The server listens on all IP, while it should listen just on localhost by default.

b) The auto-generated config file in $HOME/.jupyter is all commented.

Footnote: This is not related to the well-known (but poorly documented) token authentication issue. Indeed, if I call a list, no token is shown:

poko@W530 ~ $ jupyter notebook list
Currently running servers:
http://localhost:8888/ :: /home/poko

Try setting a default password with the command

jupyter notebook password

And then start your notebook with jupyter notebook and enter the same password in the browser.

Probably you had set a default password in the past, that is why it stops generating token and prefers the password.

I had the same issue. When launching Jupyter Notebook from the Anaconda Prompt, virtual enviroment I was prompt to enter a password (Token was not even mention in the prompt). There was nothing that i could see in the Command Prompt window to enter.

Solution:

Try setting a default password with the command

type: jupyter notebook password (in the Anaconda Prompt). You'll be asked enter a password twice. Try to launch Jupyter Notebook again. Enter the password you just entered. Success!!!!

See this issue for info on notebook authentication. You should be able to run jupyter notebook list and be able to access a token which will allow you to login.

$ jupyter notebook --port 5000 --no-browser --ip='*' --NotebookApp.token='' --NotebookApp.password=''

[W 09:04:50.273 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.

[W 09:04:50.274 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using authentication. This is highly insecure and not recommended.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM