ipython notebook can't open web browser - python

system:CentOS release 6.4 (Final)
python: 2.7.11
ipython:IPython 4.2.0
jupyter : 4.1.0
I tried to run IPython notebook. But after typing the command "ipython notebook", i found it didn't open the web browser, whereas still staying on the Linux like the picture below showing:
enter image description here

I have the similar problem with you before. I fixed it by adding a default browser in my ubuntu subsystem.
$ sudo apt-get install firefox
Then I using Xming X server to configure graphical application under my subsystem can be displayed using bash. To do that, simply install Xming, and then go to ~/.bashrc file add the following lines:
export DISPLAY=:0
After saving, you should be able to run firefox by typing:
$ firefox
Then, run
$ jupyter notebook
It should pop up a web browser and open jupyter notebook.

Related

Jupyter notebook won't launch after writing "jupyter notebook" in terminal

I have been searching this problem since a while, but can't find a solution. I am working in Windows 10.
After I activate any virtual environment and I write "jupyter notebook", the terminal gets stucked and nothing happens, like in the picture:
No errors appear, I can't Ctrl+C to kill terminal and no browser page appears.
The "jupyter --help" command works, but any other subcommand (like jupyter lab, jupyter nbclassic or jupyter run) doesn't
I tried to do the following, with no results:
Uninstall and install jupyter again
I tried to lunch jupyter notebook with Anaconda Navigator
I tried to open a browser and go to "http://localhost:8889/tree", using different port values
I tried to restart my laptop
Does anyone have any idea what is going on?
Well,
If you've re-installed Anaconda with the default settings, it should set up PATH correctly. So I hope the error is not with PATH environment variable
Try the following:
If Jupyter gives an error that it can’t find notebook, check with pip or conda that the notebook package is installed.
Try running jupyter-notebook (with a hyphen). This should normally be the same as jupyter notebook (with a space), but if there’s any difference, the version with the hyphen is the ‘real’ launcher, and the other one wraps that.
It turned out that jupyter notebook was not starting because I could not ping my localhost (127.0.0.1) because of some bad network settings.
After running netsh winsock reset in a cmd terminal to reset the network settings, I could ping the localhost and jupyter notebook started to work again.

Just installed Jupyter using Anaconda but can't run it using terminal. Says command not found

I just bought my very first Mac after using Windows my entire life and have been trying to install things. I am also still kind of a beginner at programming.
I installed Anaconda for Python 2.7 version, and then I installed the 3.7 version right after.
I tried going to terminal and typing jupyter notebook but it says:
zsh: command not found: jupyter
I am able to launch a jupyter notebook (I think) when I search for jupyter notebook in spotlight and executing the top hit.
I've been reading a lot on forums about this issue and see a lot of people talking about PATH which I am not really sure about.
I've seen people also post their which python information and theirs seem very different from mine:
which python3
usr/bin/python3
which python
usr/bin/python
Any help would be appreciated! Still learning how to set up this Mac. Thank you.
You might want to refer to this link https://jupyter-notebook-beginner-guide.readthedocs.io/en/latest/execute.html
3.1.2. Change Jupyter Notebook startup folder (Mac OS)
To launch Jupyter Notebook App:
Click on spotlight, type terminal to open a terminal window.
Enter the startup folder by typing cd /some_folder_name.
Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.
From what I can understand you are not changing to the startup directory of Jupyter.
You need to add jupyter to your path.
In your terminal, type in the following command:
export PATH="/PUT JUPYTER PATH HERE:$PATH"
Then try jupyter notebook
Reasoning: If installing using pip install --user, you must add the user-level bin directory to your PATH environment variable in order to launch jupyter lab

Problem with Opening Tensorboard in Github for windows

I am using Github for windows and I have installed Anaconda and tensorflow. I would like to open Tensorboard. Following https://itnext.io/how-to-use-tensorboard-5d82f8654496, I type
tensorboard --logdir="./graphs"
But there is nothing prompt out except the message
"TensorBoard 1.12.2 at http://DESKTOP-VSHNRU0:6006 (Press CTRL+C to quit)"
Did you try to open browser and go to http://DESKTOP-VSHNRU0:6006 web page? And maybe even better http://localhost:6006?
In my case in Anaconda Terminal:
conda activate "your Tensorflow Environment with the installed Tensorboard"
python -m tensorboard.main --logdir=C:\Users\Admin\Documents\TensorFlow\workspace\training_demo\training
Then, open http://localhost:6006/#scalars in your Browser.

Anaconda-Jupyter Doesn't open in browser

I installed Anaconda 3.7 on Ubuntu 18.04 (Bionic Beaver). Installation was successful. When I tried to start Jupyter Notebook from navigator it throws the following error.
Access to the file was denied The file at
file:///run/user/1000/jupyter/nbserver-26395-open.html is not
readable. It may have been removed, moved or file permissions may be
preventing access.
For me, this worked on Raspberry Pi4, Ubuntu 20.04, with Chromium Browser.
Generate the config file with following command.
jupyter notebook --generate-config
Config file is created at ~/.jupyter directory
Look for parameter c.NotebookApp.use_redirect_file and set the same as False.
c.NotebookApp.use_redirect_file = False in order to disable launching browser by redirect file .
Explanation:
For versions of notebook > 5.7.2, a security feature measure was added
that prevented the authentication token used to launch the browser
from being visible. This feature makes it difficult for other users on
a multi-user system from running code in your Jupyter session as you.
However, some environments (like Windows Subsystem for Linux (WSL) and
Chromebooks), launching a browser using a redirect file can lead the
browser failing to load. This is because of the difference in file
structures/paths between the runtime and the browser.
Also make sure the ~/.local/share/jupyter and ~/.jupyter directories are owned by the user running jupyter
I think you have changed your default browser from Firefox to something else, Jupyter Notebook works fine on Firefox but throws permission denied on Chromium (for me). Just go to Setting > Details > Default Application and select FireFox in Web. Cheers
As shown in the image, jupyter notebook also provides a link. Try opening it with the browser of your choice. It worked for me...
With recent versions of snap, applications installed with snap can't by default open files in hidden folders (with a name starting by .).
In Ubuntu 20.04, chromium is installed with snap (even when using the command sudo apt install chromium-browser), so chromium can't open the html file used by Jupyter.
As stated by #rahul-sood, a simple workaround is to copy-paste one of the alternative links given by Jupyter in the terminal (starting by http://localhost:8889/?token= or http://127.0.0.1:8889/?token=).
For anyone interested in open jupyterlab or jupyter notebook in chrome : install it in the terminal with
sudo apt-get install google-chrome-stable
It didn't work for me by using chromium. And, as mentionned paugier, in Ubuntu 20.04, chromium is installed with snap (even when using the command sudo apt install chromium-browser), so chromium can't open the html file used by Jupyter. So if you install chrome by using the terminal it works.
Open Chrome and paste the Jupiter file path. In my case it's file:///home/vanx/.local/share/jupyter/runtime/nbserver-14511-open.html and it worked.

Can't launch Jupyter Notebook at all

I recently installed the Anaconda Navigator (Anaconda 2) on a Windows 8.1 machine.
If I launch Jupyter Notebook from the Anaconda window, I am met with a 'Page cannot be displayed' error in my browser (Chrome).
I have tried launching Jupyter Notebook from the Anaconda Prompt (no notable error message output). I have also tried opening the Notebook in a different browser (Firefox), and I have tried running the Prompt in Administrator mode. No luck.
I have Jupyter Notebook version 5.6.0 according to the Navigator, but if I type jupyter --version at the prompt it says 4.4.0 (wondering if this is a problem?)
I kind of expected to be able to launch a Notebook right off the bat after installing Anaconda. Is there some set-up I have missed?
(Edit) Tried a few more things, after reading the Jupyter Notebook docs. Tried replacing 'localhost' in the URL with 127.0.0.1, and tried opening the link Chrome with --disable-web-security. Didn't help.
Steps which i will advice:
1) Open your command prompt in the directory which contains your notebook or where you want to create new notebook.
2) Write jupyter notebook in cmd and press enter.
If jupyter notebook is properly installed then it will certainly open, else try reinstalling it.
Note: You can always update your jupyter notebook via conda or pip. At time if you update or install package/IDE via pip, Anaconda terms it as "broken link" and give issue.

Categories