Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter notebook not launching from Anaconda Navigator

I am working on MacBook Pro 10.12.6. I downloaded the most recent Anaconda 5.2 distribution, with the Python 3.6 version.

I can launch the Jupyter Notebook from the command line without any problem, but it does not work from the Anaconda Navigator. I have the Jupyter Notebook version 5.6.0 in the Navigator. How can I get it to work?

like image 611
Marc Avatar asked Sep 12 '18 17:09

Marc


People also ask

How do I launch JupyterLab from Anaconda prompt?

You can search for Anaconda Navigator via Spotlight on macOS ( Command + spacebar ), the Windows search function ( Windows Logo Key ) or opening a terminal shell and executing the anaconda-navigator executable from the command line. After you have launched Anaconda Navigator, click the Launch button under JupyterLab.

How do you open the Jupyter Notebook in Anaconda environment?

To use your new environment with Jupyter Notebooks, open the Notebook application. Click the New button to open a new notebook. In the drop-down menu under Notebooks, the environment you just created is displayed. To activate that environment, select it.

Why is my Jupyter Notebook not showing output?

It is your expection that needs to be adapted. The Jupyter Notebook only shows what the last statement of a cell evaluates to. If you define a function, this does not evaluate to anything that could be displayed. So you can't see anything in the upper cell.


1 Answers

I had the same issue on my computer. The issue was that a particular file went missing while updating the notebook. Please check the following file in the folder: /Users/your-name/.anaconda/navigator/scripts/notebook.sh and the corresponding output and error files called something like *out.txt and *err.txt The script notebook.sh should look like this:

#!/usr/bin/env bash

source /Users/your-name/anaconda3/bin/activate /Users/your-name/anaconda3
open /Users/your-name/anaconda3/bin/jupyter_mac.command >/Users/your-name/.anaconda/navigator/scripts/notebook-out-1.txt 2>/Users/your-name/.anaconda/navigator/scripts/notebook-err-1.txt

The error message said that the file jupyter_mac.command did not exist. This was why the notebook was not getting launched.

To fix it simply create this file, jupyter_mac.command , in the /Users/your-name/anaconda3/bin/ folder. The file is the following simple script :

#!/usr/bin/env bash

DIR=$(dirname $0)
$DIR/jupyter-notebook

After saving this file, you may need to give it executable permission using the chmod +x command.

Voila! It's done.

like image 194
legolagon Avatar answered Sep 21 '22 13:09

legolagon