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.
Related
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).
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.
I'm trying to connect local run time but it's not connecting,
I used the troubleshooting dialog following commands:
pip install jupyter_http_over_ws
jupyter serverextension enable --py jupyter_http_over_ws
jupyter notebook \ --NotebookApp.allow_origin='https://colab.research.google.com --port=8888 \--NotebookApp.port_retries=0
Have tried the same above steps as said in below URL
https://research.google.com/colaboratory/local-runtimes.html
Facing an issue 'Jupyter authentication cookie was not detected'
Tried by disabling adblocker, antivirus and also using different port numbers. Below was the solution given by team
Navigate to http://localhost:8888 in a separate browser tab and follow the provided instructions. This will set a browser cookie used for authentication between the browser and the Jupyter notebook server.
But when I open the URL, it asks for a password(already set up) and then no further instructions are appearing.
This issue was raised in Github issues for Collaboratory:
This answer helped me https://github.com/googlecolab/jupyter_http_over_ws/issues/1#issuecomment-557469128
According to this issue
start the jupyter notebook with the below command.
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --NotebookApp.port_retries=0 --notebook-dir="" --no-browser --allow-root --NotebookApp.token='' --NotebookApp.disable_check_xsrf=True --port=8888
then open the notebook by going to this URL.
localhost:8888
according to kris This may allow you to connect, but it basically disables all security features.
Then retry connecting to local runtime with Google Colab
If it does not solve your problem then try disabling AdBlock extension or app.
For Windows (10/11)
Method 1: Using git bash
follow these steps
https://research.google.com/colaboratory/local-runtimes.html
Method 2: Using Windows terminal & Multiline commands
Install jupyter_http_over_ws
pip install jupyter_http_over_ws
enable the jupyter_http_over_ws jupyter extension (one-time)
jupyter serverextension enable --py jupyter_http_over_ws
Use multiline commands to start server and authenticate
jupyter notebook ^
--NotebookApp.allow_origin='https://colab.research.google.com' ^
--port=8888 ^
--NotebookApp.port_retries=0
Method 3: Using single-line command & windows terminal
Install jupyter_http_over_ws
pip install jupyter_http_over_ws
enable the jupyter_http_over_ws jupyter extension (one-time)
jupyter serverextension enable --py jupyter_http_over_ws
Use single-line commands to start server and authenticate
jupyter notebook --NotebookApp.allow_origin='https://colab.research.google.com' --port=8888 --NotebookApp.port_retries=0
Once the server has started, it will print a message with the initial backend URL used for authentication. Make a copy of this URL as you'll need to provide this in the next step.
Connect to the local runtime
In Colaboratory, click the "Connect" button and select "Connect to local runtime...". Enter the URL from the previous step in the dialog that appears and click the "Connect" button. After this, you should now be connected to your local runtime.
There are several reasons why a local connection might fail. To gather more diagnosis information, click the 'troubleshoot' link in the notification that appears in the lower left of the screen.
It will look like this:
I'd recommend following whatever steps are recommended there. If you get stuck, please update your original question with the diagnosis offered in the troubleshooting dialog.
I've just installed Jupyter Notebook so I can follow the Udemy Python Bootcamp course.
I already had a fully working install of Python 3.71 and Pycharm and then installed Jupyter Notebook with:
pip install jupyter
This was successful other than messages about the some files not being in the PATH environment variable. I manually added the folder to PATH.
I have run Jupyter Notebook at the command prompt with:
jupyter notebook
So far so good - Jupyter Notebook home screen appears in my browser with all the expected folders, Documents, Desktop etc listed.
However if I try and left click on one to see its contents then it pauses for a few seconds and just displays the following (not very descriptive) error:
Server error: error
The error as a screen shot:
I'm absolutely stuck and can't progress my course without Jupyter Notebook.
I'm running Windows 7 Home Premium 64 bit
Firefox (Quantum 64.0)
Bitdefender Internet Security 2018
You can try
pip install --upgrade jupyterhub
I solved the problem using this command.
I tried to open ipython in terminal with ipython notebook and it will not open ipython notebook. It gives the following error:
| ~/documents/ud120-projects/datasets_questions # HJ (JiaHui)
| => ipython notebook
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and
will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in
the future
[I 14:46:50.516 NotebookApp] Serving notebooks from local directory:
/Users/JiaHui/Documents/ud120-projects/datasets_questions
[I 14:46:50.517 NotebookApp] 0 active kernels
[I 14:46:50.517 NotebookApp] The Jupyter Notebook is running at:
http://localhost:8888/?token=ef13f681f4d61223064e41a5a9e369813c155d27b0103471
[I 14:46:50.517 NotebookApp] Use Control-C to stop this server and shut down
all kernels (twice to skip confirmation).
[C 14:46:51.567 NotebookApp]
Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?
token=ef13f681f4d61223064e41a5a9e369813c155d27b0103471
0:97: execution error: "http://localhost:8888/tree?
token=145eccd35722c35c6525d8a4d376f27aa60358dc7d00de4c" doesn’t understand the
“open location” message. (-1708)
I have upgraded conda jupyter but it still won't work. How can I fix this?
This issue due to the newest Mac OSX 10.12.5 upgrade. Please follow these steps to fix it:
Generate jupyter config if you don't have it:
jupyter notebook --generate-config
Use vim to open that config file and add Google chrome value in:
c.NotebookApp.browser = u'chrome' (Make sure to take out the # comment sign)
I used the same approach as Kiem Nguyen above, but 'chrome' wouldn't work for me, even after editing my .bash_profile as Hanshenry90 suggested.
To use Safari to view the notebook, open your terminal and enter:
jupyter notebook --generate-config
cd ~.jupyter
nano jupyter_notebook_config.py
ctrl + w "NotebookApp.browser" + enter to skip to that part of the file. Then delete # and change the line to:
c.NotebookApp.browser = u'Safari'
Restart your notebook, with jupyter notebook, and it should open in Safari.
If anyone has any insight on how to make this work for Chrome, that would be much appreciated.
I liked most imarti's solution:
export BROWSER=open
It is low overhead and works with your default browser
EDIT: macOS 10.12.6 has been released, so now the recommended solution is to just update your OS.
editing my nano .bash_profile file to contain the lines:
BROWSER=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
export BROWSER
Not the best fix, but a potential workaround...
Go to your browser and enter the login token provided.
In your case: http://localhost:8888/
After starting a new notebook, I found that my kernel would die and be unable to restart. Updating my ipykernel fixed this:
pip install ipykernel --upgrade
This is an issue possibly due to the recent upgrade of Mac OSX. You can follow the discussion and possible solutions here, here and here.