Jupyter Notebook "Password or token" issue - jupyter-notebook

I am trying to open the jupyter in the firefox since I've always opened it in chrome. and what should I do to tackle this password? Thanks in advance

When you start a jupyter server locally, you type jupyter notebook in a cmd console. And then you get an output similar to this:
Jupyter should then redirect you to localhost:8888 in your browser. If it asks you for your token/password, you can find it in the console, last line. In the case of this image, the token is 5fe355c8a0e68158fed7b498805097811951f519809d7b44

Related

There is a problem when opening Jupyter Notebook

I installed Anaconda 3 in Linux and tried to open Jupyter notebook in browser by typing 'jupyter notebook' in terminal.
But what I've got is the screen I added below.
As I guess, Jupyter Notebook is currently opened via 'Elinks', but I have no idea about what this is.
Do you know how to open Jupyter Notebook in the browser I want, such as Firefox or Chrome?
I wanted to add some information in case you wanted to later access juypter notebook via elinks (or any other text-based web browser in terminal).
I will also go over opening jupyter notebook with Anaconda Navigator.
First, You need to first install Node.js Javascript Runtime Environment by running this command in terminal.
sudo apt-get install node.js
Next, close and reopen terminal (I always do this when installing new software via command line).
When you next try to access your jupyter notebook via elinks it will ask for a token or password.
Option 1 : Token.
Find the token by entering jupyter notebook list in terminal.
Option 2 : Password.
You can create a password for jupyter notebook by entering jupyter notebook password in the terminal.
You can now use the token or your newly created password in order to access jupyter notebook via full-featured text web browser such as elinks.
If you want to access jupyter notebook via Firefox, Chrome, etc. then just use anaconda. This will automatically open jupyter notebook in your standard web browser.
Enter anaconda-navigator in terminal.
Once anaconda navigator opens, simply launch jupyter notebook from the selection.
You can set Firefox or Chrome as default browser, then it should open directly in it.
If it still doesn't, you can always copy the URLs which are displayed when jupyter notebook is started, and paste it in your browser.
To access the notebook, open this file in a browser:
file:///home/harshit/.local/share/jupyter/runtime/nbserver-2985-open.html
Or copy and paste one of these URLs:
http://localhost:8888/?token=9fc770713dbd755750bbe842896420ecfa7abc038581fc04
or http://127.0.0.1:8888/?token=9fc770713dbd755750bbe842896420ecfa7abc038581fc04
By the way, jupyter notebook doesn't work, because, by default, JS is not enabled in eLinks browser (you can enable it).

Issue running jupyter notebook via wls

Installed WSL on Windows 10.
Installed Anaconda according to the Anaconda documentation with the following commands:
bash Anaconda3-2020.02-Linux-x86_64.sh
source ~/.bashrc
You can see the '(base)' in the beginning of each command input line, indicating the conda is activated.
Then I run jupyter notebook by typing:
jupyter notebook
Then I see the following changes as shown in the screen record.
Briefly, the WSL terminal window showed some information very quickly, but is changed to the windows powershell window before you could even tell the information that showed up. I know those information should contain a file and url for opening the jupyter notebook in the web browser. But they flashed out so quickly. Does anyone know why this happens?
Here is a dynamic graph of the Screen record of this issue:
Solved:
1. Wait for a bit more time on the windows cmd and the jupyter notebook running information will show up, where includes the url to open jupyter notebook in the web browser.
OR
Open up another wsl terminal, activate the same environment and type jupyter notebook list, which will show the current running jupyter notebook server. The url is also can be found there.

Unable to start Jupyter lab or Jupyter notebook in a browser

I get the following log when starting Jupyter lab or Jupyter notebook-
[W 17:03:08.963 NotebookApp] No web browser found: could not locate runnable browser.
and Jupyter does not start a browser (or a tab in a browser).
(I am using Linux - Manjaro i3 community edition)
I have configured Jupyter to use google-chrome-stable by
jupyter notebook --generate-config
and setting the following line in ~/.jupyter/jupyter_notebook_config.py
c.NotebookApp.browser = '/usr/bin/google-chrome-stable'
(Yes I have uncommented the above line)
/usr/bin/google-chrome-stable and google-chrome-stable successfully launch chrome from the terminal.
I have also tried
jupyter lab --browser=google-chrome-stable
jupyter lab --browser google-chrome-stable
without success.
Jupyter used to open in a browser when I had Pale Moon installed on my system, but now that I have removed it, I cannot seem to get this working. google-chrome-stable is my default browser now.
The obvious workaround is to copy the localhost URL to a web browser but I am trying to avoid that.
Posting dsjamieson's answer here:
You have to give your browser (“google-chrome-stable” in this case) a string format argument (%s) in order to pass it the notebook’s URL:
jupyter lab --browser="google-chrome-stable %s"
or, if you prefer opening chrome in app mode:
jupyter lab --browser="google-chrome-stable --app=%s"
For Jupyter Lab, to make this more permanent:
jupyter-lab --generate-config
Then edit ~/.jupyter/jupyter_lab_config.py and set the ff:
c.ServerApp.browser = 'google-chrome-stable %s'
Or do a variation of double0darbo's answer above.

Error connecting to Jupyter notebook localhost

I've tried looking this up, found something similar but not quite. I'm new so if I've posted something commonly posted, my apologies!
When I run jupiter notebook on terminal, this shows up:
Serving notebooks from local directory: /home/myname/Jupyter
0 active kernels
The Jupyter Notebook is running at: http://localhost:8888/?token=9da2454c0873c8989e93c42f9cc0ee5892da4da6e02fd9b5
Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
No web browser found: could not locate runnable browser.
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=9da2454c0873c8989e93c42f9cc0ee5892da4da6e02fd9b5
And then when I paste the link to google chrome it says
Safari can't open the page "http://localhost:8888/?token=9da2454c0873c8989e93c42f9cc0ee5892da4da6e02fd9b5" because Safari can't connect to the server "localhost."
I've looked at some other similar issues but I can't find a definite solution other than that port 8888 is being used? Any advice appreciated!
Notes: I've tried this on a Mac running OS X El Capitan version 10.11.6
I had the same issue. What I did was following.
Step 1: Go to Windows start menu and search for Anaconda Prompt (Anaconda3)
Step 2: Type "jupyter notebook" and click "Enter" btn
Step 3: Instead of using localhost use port 127.0.0.1.
Note: Port may be different for you, so just check before you try.

Jupyter Notebooks Hang in Browser on Windows 10

I just installed Miniconda and the R Essentials bundle on my Windows 10 machine, following the instructions given here. Everything went swimmingly until I opened up an Anaconda command prompt and entered jupyter notebook and got an error. I then used ipython notebook which worked, so okay, no problem there.
However, after creating a new folder and trying to create a new R notebook within that folder, my Jupyter tabs started to hang. Whenever I try to do something, whether it is rename the notebook, run a block of code, basically anything, all of the Jupyter tabs sit there loading endlessly saying "Waiting for localhost..."
I try stopping the server and restarting it, but every time I try to do anything I get the same result. I also tried changing the port and running the command prompt as administrator--same result. I am using Chrome, which shouldn't be an issue.
Any ideas? I was really excited about using a Jupyter notebook to keep track of my analyses in R, but if I can't even get it to function out of the box I'll have to find a better solution.

Resources