Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't open Jupyter notebook with Anaconda

I just installed Anaconda, in my Surface Pro 3, with Windows 10, using the provided installer for 64-bit. When I try to launch "jupyter notebook" I always get the following message:

Microsoft Windows [Version 10.0.14393] (c) 2016 Microsoft Corporation. All rights reserved.

C:\Users\Carlos>jupyter notebook Traceback (most recent call last):

File "C:\Program Files\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in import notebook.notebookapp

File "C:\Program Files\Anaconda3\lib\site-packages\notebook\notebookapp.py", l ine 32, in from zmq.eventloop import ioloop

File "C:\Program Files\Anaconda3\lib\site-packages\zmq__init__.py", line 34, in from zmq import backend

File "C:\Program Files\Anaconda3\lib\site-packages\zmq\backend__init__.py", l ine 40, in reraise(*exc_info)

File "C:\Program Files\Anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", lin e 34, in reraise raise value

File "C:\Program Files\Anaconda3\lib\site-packages\zmq\backend__init__.py", l ine 27, in _ns = select_backend(first)

File "C:\Program Files\Anaconda3\lib\site-packages\zmq\backend\select.py", lin e 26, in select_backend mod = import(name, fromlist=public_api)

File "C:\Program Files\Anaconda3\lib\site-packages\zmq\backend\cython__init__ .py", line 6, in from . import (constants, error, message, context,

ImportError: DLL load failed: The specified module could not be found.

I tried to uninstall/install again several times, I tried to install it just for me or for all the users in the computer, I tried to update anaconda first...with no success. Any clue?

Thanks!

like image 768
Chucky Avatar asked Jan 07 '17 10:01

Chucky


People also ask

Does Anaconda work with Jupyter Notebook?

Anaconda Navigator is a GUI tool that is included in the Anaconda distribution and makes it easy to configure, install, and launch tools such as Jupyter Notebook. A Conda Python environment is an isolated environment.

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.

Why is my Jupyter Notebook not connecting to kernel?

A kernel error occurs basically when you try opening a python 3 file in the wrong directory. The truth is Jupyter and Python are two different software entirely. So, a kernel error occurs when Jupyter fails to connect with a specific version of Python.


2 Answers

It seems to be a problem with the default installation of Anaconda. So, I removed the pyzmq package, which seems to be the problematic one.

This is what I have done:

  1. conda uninstall pyzmq (This also removes jupyter related packages!)
  2. conda install pyzmq (to reinstall it)
  3. conda install jupyter (to reinstall jupyter related packages)

Now I can open Jupyter Notebook!

like image 170
Chucky Avatar answered Sep 21 '22 20:09

Chucky


Regarding the issue of opening Jupyter Notebook with Anaconda, I was having this error message:

[W 12:34:52.309 LabApp] Permission to listen on port 8984 denied.
[C 12:34:52.309 LabApp] ERROR: the notebook server could not be started because no available port could be found.

It was trying each port but failing because of no permission. Running jupyter on a custom port fixed the problem:

jupyter notebook --port 9999
like image 24
Bex T. Avatar answered Sep 22 '22 20:09

Bex T.