Can't open Jupyter notebook with Anaconda

Question:

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:UsersCarlos>jupyter notebook Traceback (most recent call last):

File “C:Program
FilesAnaconda3Scriptsjupyter-notebook-script.py”, line 3, in

import notebook.notebookapp

File “C:Program
FilesAnaconda3libsite-packagesnotebooknotebookapp.py”, l ine 32,
in
from zmq.eventloop import ioloop

File “C:Program FilesAnaconda3libsite-packageszmq__init__.py”,
line 34, in
from zmq import backend

File “C:Program
FilesAnaconda3libsite-packageszmqbackend__init__.py”, l ine 40,
in
reraise(*exc_info)

File “C:Program
FilesAnaconda3libsite-packageszmqutilssixcerpt.py”, lin e 34, in
reraise
raise value

File “C:Program
FilesAnaconda3libsite-packageszmqbackend__init__.py”, l ine 27,
in
_ns = select_backend(first)

File “C:Program
FilesAnaconda3libsite-packageszmqbackendselect.py”, lin e 26, in
select_backend
mod = import(name, fromlist=public_api)

File “C:Program
FilesAnaconda3libsite-packageszmqbackendcython__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!

Asked By: Chucky

||

Answers:

There may be access privileges issues with installing in the Program Files folder.

I have Anaconda3 and installed into the root C: directory and had no problems with dll file installation like you have.

Try installing Anaconda3 as Anaconda3 with no spaces directly as its own folder in the C: directory.

Once installed, you can use the Anaconda Cheat Sheet to get started quickly to verify that installation works by going into the Anaconda3 folder and (if you are on Windows) SHIFT+RIGHT-CLICK-MOUSE and it will give you menu with open to open Command [Line] Window directly in that directory of Anaconda3. Open the Command Line window and run the commands from the Anaconda Cheat Sheet to quickly get started:

http://conda.pydata.org/docs/_downloads/conda-cheatsheet.pdf

You will need to follow instructions to create virtual Python development environment/folder within the Anaconda3. Then you will need to make sure you install the Jupyter Notebook into that virtual env/folder. Of course you will need to “activate” that virtual env after installing.

I hope this helps.

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!

Answered By: Chucky

Here is what worked for me (You have to upgrade pyzmq):

python -m pip install --upgrade pip
pip install --upgrade pyzmq

After that it worked fine.

Answered By: Deepak

I also got somewhat same error today on my system and now it got resolved by following solution.

Please add following in the path variable, it will be resolved thereafter (I just checked):

  • C:MLinstalled_toolsanaconda3 (was already present)
  • C:MLinstalled_toolsanaconda3Scripts (was already present)
  • C:MLinstalled_toolsanaconda3Librarybin (added now)
  • C:MLinstalled_toolsanaconda3Librarymingw-w64bin (added now)

Refer this link for exact exception which I got (with exact versions of the modules) and resolved thereafter. Above exception might be of older anaconda version but solution should be same.

Answered By: amandeep1991

There are multiple options to fix this, i am still investigating on the root cause. However, you can try the solution given below..

if the Jupyter notebook version is 5.1.0 & above, you can uninstall using << conda uninstall notebook >> and then install Jupyter notebook from Anaconda Command prompt using << conda install notebook=5.0.0 >> This will help you launch the Anaconda Navigator from base environment itself.

Second option..,
Create another environment in conda << conda env create -f {name of yml file}.yml >>.
After creating, open the Anaconda navigator UI, switch the environment to the newly created environment and launch Jupyter ( this will work even with latest Jupyter notebook version 5.3.7 as well), it will work.

I am still investigating why the latest version is not opening with the base environment. however, we can use solution 1 or 2 based on your preference.

Answered By: Deepak

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
Answered By: Bex T.

I just wasn’t able to start Jupyter notebook directly after the installation.

Using a new terminal window was the solution for me.

Answered By: Thomas R

Close the jupyter notebook and open it once again

Answered By: Mounesh
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.