Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jupyter Notebook with python 3 not running

I cannot open jupyter notebook with Python 3. I have Anaconda for Python 2 and Anaconda for Python 3 installed (both 64 bit for Windows). If I run jupyter notebook for Python 2 everything works fine but with Python 3 it does not work. I already reinstalled Anaconda 3 (4.2 Version = Python 3.5) but that did not help. I also tried out all the google results. I still get the following error when i run jupyter notebook from the anacoda prompt. Any help is highly appreciated.

(C:\Users\Myamoto\Anaconda3) C:\Users\Myamoto>jupyter notebook
_cffi_ext.c
AppData\Roaming\Python\Python35\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(209): fatal error C1083: Cannot open include file: 'sys/un.h': No such file or directory
Traceback (most recent call last):
  File "C:\Users\Myamoto\Anaconda3\Scripts\jupyter-notebook-script.py", line 3, in <module>
    import notebook.notebookapp
  File "C:\Users\Myamoto\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 31, in <module>
    from zmq.eventloop import ioloop
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\__init__.py", line 34, in <module>
    from zmq import backend
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 40, in <module>
    reraise(*exc_info)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
    raise value
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\__init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\select.py", line 26, in select_backend
    mod = __import__(name, fromlist=public_api)
  File "C:\Users\Myamoto\AppData\Roaming\Python\Python35\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
    from . import (constants, error, message, context,
ImportError: cannot import name 'constants'
like image 270
Muten_Roshi Avatar asked Jun 29 '17 11:06

Muten_Roshi


People also ask

Why is my python Jupyter Notebook not running?

Jupyter doesn't load or doesn't work in the browserTry disabling any browser extensions and/or any Jupyter extensions you have installed. Some internet security software can interfere with Jupyter. If you have security software, try turning it off temporarily, and look in the settings for a more long-term solution.

How do I open a Jupyter Notebook with Python 3 in Windows?

3.1. To launch Jupyter Notebook App: Click on spotlight, type terminal to open a terminal window. Enter the startup folder by typing cd /some_folder_name . Type jupyter notebook to launch the Jupyter Notebook App The notebook interface will appear in a new browser window or tab.

How do I change the version of Python running in Jupyter Notebook?

To change the kernel version in Jupyter Python Notebooks follow the steps below : Open the Python Notebook and click on " Kernel " from the menu bar located on top of the python notebook. Click on " Change kernel " from the drop down box that appears and chose the version that is required.


1 Answers

    pip uninstall pyzmq 

after did that

    pip install pyzmq.

Thanks to Muten_Roshi. this method works nice.

like image 90
ming lin Avatar answered Sep 18 '22 11:09

ming lin