Jupyter Notebook DLL Error




I can start my Jupyter Notebook in the Anaconda Prompt then connect viat he token. 


On the other hand, If I try to start my notebook with pycharm I get a DLL error:


C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\python.exe "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pycharm\pycharm_load_entry_point.py" notebook --no-browser --ip --port 8888 --port-retries=0
[TerminalIPythonApp] WARNING | Subcommand `ipython notebook` is deprecated and will be removed in future versions.
[TerminalIPythonApp] WARNING | You likely want to use `jupyter notebook` in the future
C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(213): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm Community Edition 2018.2.4\helpers\pycharm\pycharm_load_entry_point.py", line 12, in <module>
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\__init__.py", line 125, in start_ipython
return launch_new_instance(argv=argv, **kwargs)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance
File "<decorator-gen-113>", line 2, in initialize
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\terminal\ipapp.py", line 308, in initialize
super(TerminalIPythonApp, self).initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\application.py", line 450, in initialize
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\terminal\ipapp.py", line 303, in parse_command_line
return super(TerminalIPythonApp, self).parse_command_line(argv)
File "<decorator-gen-4>", line 2, in parse_command_line
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 514, in parse_command_line
return self.initialize_subcommand(subc, subargv)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\IPython\core\application.py", line 243, in initialize_subcommand
return super(BaseIPythonApplication, self).initialize_subcommand(subc, argv)
File "<decorator-gen-3>", line 2, in initialize_subcommand
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\traitlets\config\application.py", line 445, in initialize_subcommand
subapp = import_item(subapp)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\ipython_genutils\importstring.py", line 31, in import_item
module = __import__(package, fromlist=[obj])
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\notebook\notebookapp.py", line 46, in <module>
from zmq.eventloop import ioloop
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\__init__.py", line 47, in <module>
from zmq import backend
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 40, in <module>
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\select.py", line 27, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\John_Doe\AppData\Local\Continuum\anaconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.

Is there a way to get around this error so I don't have to go through the tedious process of externally starting the jupyter notebook in Anaconda Prompt?
Comment actions Permalink

Hi S_M,

Thank you for contacting PyCharm support.

Could you please check the notebook from web browser? Does it work?

Are you able to reproduce as described here https://www.jetbrains.com/help/pycharm/using-ipython-notebook-with-product.html?

Kind regards,



Comment actions Permalink

I can start a Jupyter notebook from anaconda and then connect via the token. The problem is I cannot close the notebook from Pycharm and the next time I open the file I have to repeat that whole process since the interpreter has hard saved the token it seems.

I also have another problem on-top of not being able to load the python notebook from PyCharm. Randomly, my notebook turns into a code.py.


Comment actions Permalink

Please reproduce the problem and then upload your logs folder zipped to https://uploads.services.jetbrains.com/ and let us know the name of the zip file.

How do you run Jupyter in PyCharm? Hit Run --> Cancel --> Run Jupyter Notebook?

Comment actions Permalink

I run Jupyter just as you showed. I am nervous to give you my idea.log file since this is my company laptop and it may contain sensitive information. Is there something specific you would want me to look for in the log?

Comment actions Permalink

That's a known issue, PyCharm incorrectly set PATH for conda interpreter PY-27234.

Comment actions Permalink

Is there a way to fix this?

Comment actions Permalink

The dirty ways I can think of are:

  • Activate conda environment in the command line and start PyCharm from the same cmd session
  • Activate conda in the command line, copy PATH variable value and place it in PyCharms' run configuration environment variables settings
Comment actions Permalink

Hi, I have the exactly same problem that you had, and I can't find a way to solve it. Have you solved it?

Comment actions Permalink

Hi Gray19950103,

A workaround could be:


- run import os in the system terminal using the same interpreter

- run print(os.environ['PATH'])

- copy the result and add as PATH environment variable to your Run/Debug Configuration

Comment actions Permalink

Hi Sergey Karpov,

it works in your way, thanks


Please sign in to leave a comment.