12
votes

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!

7

7 Answers

17
votes

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!

7
votes

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:\ML\installed_tools\anaconda3 (was already present)
  • C:\ML\installed_tools\anaconda3\Scripts (was already present)
  • C:\ML\installed_tools\anaconda3\Library\bin (added now)
  • C:\ML\installed_tools\anaconda3\Library\mingw-w64\bin (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.

5
votes

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.

2
votes

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.

1
votes

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.

0
votes

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
0
votes

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

Using a new terminal window was the solution for me.