Jupyter notebook not launching from Anaconda Navigator
Asked Answered
G

10

11

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?

Gingerly answered 12/9, 2018 at 17:52 Comment(1)
When I tried this it would not load but it said it was trying to load in into python 2.7. I got a pulldown menu to try another virtual environment and told it to try it in my py36 environment. It worked when I did that.Selfimmolating
B
13

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.

Buffet answered 2/10, 2019 at 21:52 Comment(3)
Please edit your answer by formatting folder locationsMasonmasonic
Why not just dirname/jupyter-notebook? Your version didn't work for me but this simpler version did.Bacterium
This works! except that on my mac, anaconda might be installed not in your home folder but in /opt/anaconda3. @Buffet can you edit the answer to be more genericSpool
M
2

Launch it from cmd / terminal in cmd type jupyter notebook.

Marquis answered 16/9, 2021 at 8:11 Comment(1)
As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.Cottonade
S
1

I faced a similar issue running Anaconda on CentOS 7. The root cause was Anaconda was running as root user. I created an OS user for installing Anaconda. Since that, I can start the Jupyter Notebook (Yes, I know this is a very basic best practice) :)

Sunstroke answered 10/1, 2020 at 9:12 Comment(0)
S
0

You have more than one version of python on your computer so you should set up virtual environments for each version of python. It's very easy to do using Anaconda. Instructions are here and here. Once you have created your virtual environments then open Anaconda-Navigator. Once you've opened Navigator you'll see the following pane with a pull-down menu (as highlighted on the image).

Anaconda-Navigator Window

From that pull-down menu select one of your virtual environments and try running Jupyter again.

Selfimmolating answered 12/9, 2018 at 22:58 Comment(5)
I does not work for me. I tried with my py36 environment and the base environment as well.Gingerly
ok. I sure don't understand what is happening. Does it give you any messages or anything?Selfimmolating
No, no message at all. It works find from the terminal, but from the navigator nothing happen when I click on launch Jupyter NotebookGingerly
Funny thing, I cannot open it from the "home" tab in the Navigator, but if I go to the "environments" tab, and click on the green arrow next to the env I want and then select "open with Jupiter Notebook", then the notebook is launched! Any explanation for this or help to get it work from the "Home" tab?Gingerly
yea that works for me too. But why doesn't it work for you from Home? I'm missing something here...Selfimmolating
M
0

I resolved this using the following command, although note that it rolled back my (base) environment to the original state.

conda install --revision 1

Further discoveries:

  • I had the same behaviour as Marc in the comments above (it would launch from Environments but not the Home Page).

  • Clicking on Launch did actually start a notebook, it just didn't force a browser window to open; navigating to http://localhost:8888/tree after doing so took me to it.

There is further discussion of the issue (at least the one I had) here:

https://github.com/ContinuumIO/anaconda-issues/issues/9976

  • I had previously had problems with upgrading JupyterLab to 1.02, which I had succeeded in doing but perhaps something in that process resulted in the issue.
Murr answered 22/8, 2019 at 10:28 Comment(0)
F
0

When I installed Anaconda I faced a similar problem. Jupyter notebook was not launching from Anaconda. I google searched and tried every piece of advice but nothing worked until I figured out that Jupyter notebook runs on localhost and I already have XAMPP. I use xampp as localhost to test my web pages. I uninstalled the xampp completely. Restart the computer, run the Anaconda and launched jupyter notebook. Voila, now it's running. Now when I installed Docker, I faced a similar problem. then I did the same. Uninstalled Anaconda in order to run Docker. It'd be my pleasure if it solves anyone's problem.

Fugazy answered 3/4, 2021 at 14:50 Comment(0)
D
0

I had a custom path set as the base path for my jupyter notebook start-up folder. While taking some backup I had removed that folder. This was leading to Jupyter notebook and JupyterLab failing on start up. It worked fine after I fixed that path.

Divergent answered 24/4, 2021 at 19:4 Comment(0)
T
0

You just need to find the right version of anaconda I think. For me it works well when I downloaded a previous version, I was also facing the same issue. I could then launch jupyter from navigator itself.

Tuberose answered 29/6, 2021 at 17:40 Comment(1)
Please clarify which version is working for you.Ibert
P
0

Few things to try

  • Run the Navigator in admin mode (Right click the shortcut -> More -> Run as Administrator)
  • Downgrade Jupyterlab to another version and upgrade it again (basically reinstalling)

The first one solved my issue.

Polad answered 25/8, 2021 at 4:2 Comment(0)
C
0

I faced the similar issue on windows 11 - My Jupyter notebook wasn't launching, so I fixed it by giving administrator permissions to the Jupyter runtime folder. Here's how I did it:

Search for 'Anaconda Navigator' in the taskbar and open its file location.

Click on the 'Roaming' folder in the search bar.

Open the 'jupyter' folder.

Find the 'runtime' folder inside it.

Right-click the 'runtime' folder, select 'Properties,' then go to the 'Security' tab.

Click 'Edit,' and grant the folder 'Administrator' permissions.

Click 'OK' to apply the changes.

Chadwell answered 24/8 at 14:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.