jupyter-notebook, ImportError: cannot import name 'Type'
Solution 1
Install anaconda ,
"Anaconda is a free and open-source distribution of the Python and R programming languages for scientific computing, that aims to simplify package management and deployment " (As on google)
and then try Jupyter notebook link: https://www.anaconda.com/distribution/
Solution 2
It is because Python3.5 has its own version typing (https://docs.python.org/3/library/typing.html), and it is incompatible with the installed version of jupyter/tornado Upgrade to python3.6 could solve the problem.
Solution 3
Since the error seems to come from the tornado package, i would try to reinstall tornado if this does not help I made the experience that the conda packages often work better in windows: so just reinstall jupyter notebook (best in a new env) using anaconda
Best of luck, installing jupyter notebook used to make me a lot of troubles as well.
Solution 4
If you're using Python 3.5.1 and don't want to use Conda, downgrading the Tornado version allows it run. Current Tornado version is 6.0.3. I downgraded it 4.5.1 because I knew it worked. Other versions after this might also work. It's an easy fix without the need to update the Python version.
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
I am a Windows user, and I have installed Python 3.6 on my computer. In order to use Jupyter notebooks, I downloaded atom. I already installed ipython and pandas. After entering the command
jupyter notebook
on the command-line, my browser doesn't open jupyter notebook, instead I get the follow error message:[C:\Users\ELIDAD>jupyter notebook Traceback (most recent call last): File "c:\users\elidad\appdata\local\programs\python\python35\lib\runpy.py", line 170, in _run_module_as_main "__main__", mod_spec) File "c:\users\elidad\appdata\local\programs\python\python35\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\ELIDAD\AppData\Local\Programs\Python\Python35\Scripts\jupyter-notebook.EXE\__main__.py", line 5, in <module> File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\notebook\__init__.py", line 25, in <module> from .nbextensions import install_nbextension File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\notebook\nbextensions.py", line 610, in <module> from .extensions import ( File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\notebook\extensions.py", line 8, in <module> from tornado.log import LogFormatter File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\tornado\log.py", line 34, in <module> from tornado.escape import _unicode File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\tornado\escape.py", line 27, in <module> from tornado.util import unicode_type File "c:\users\elidad\appdata\local\programs\python\python35\lib\site-packages\tornado\util.py", line 21, in <module> from typing import ( ImportError: cannot import name 'Type']
So, what is the problem? I am new to python and jupyter notebook. Thank you very much.