반응형

 

 

 

안녕하세요 봉자씨입니다.

 

파이썬3에서 주피터 노트북을 설치하면서 에러가 발생하는 부분이 있어서 혹시나 해서 공유드립니다.

아래와 같이 설치를 시도 했습니다.

bongjacy:~ bongdary$ pip3 install jupyter

 

문제 없이 설치 되는 듯합니다.

그런데 실행을 하니 실행이 안되고 아래와 같은 에러가 표시가 됩니다.

 

명령어를 실행합니다.

bongjacy:~ bongdary$ jupyter notebook

 

에러가 발생했습니다.

Traceback (most recent call last):

  File "/Library/Frameworks/Python.framework/Versions/3.5/bin/jupyter-notebook", line 5, in <module>

    from notebook.notebookapp import main

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/notebook/__init__.py", line 25, in <module>

    from .nbextensions import install_nbextension

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/notebook/nbextensions.py", line 605, in <module>

    from .extensions import (

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/notebook/extensions.py", line 8, in <module>

    from tornado.log import LogFormatter

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tornado/log.py", line 34, in <module>

    from tornado.escape import _unicode

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tornado/escape.py", line 27, in <module>

    from tornado.util import unicode_type

  File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/tornado/util.py", line 21, in <module>

    from typing import (

ImportError: cannot import name 'Type'

 

무슨 에러인지 확인을 이것 저것해봤습니다.

 

it's because of the version of tornado and python 3.

 

결국 tornado 이것을 어떻게 하면 해결이 난다는 것입니다.

그래서 아래와 같이 처리를 하니 잘 실행이됩니다.

 

pip install tornado==5.1.1

 

위와 같이 실행 후의 결과입니다.

bongjacy:~ bongdary$ jupyter notebook

 

[I 14:11:56.273 NotebookApp] Writing notebook server cookie secret to /Users/bongdary/Library/Jupyter/runtime/notebook_cookie_secret

[I 14:11:57.056 NotebookApp] Serving notebooks from local directory: /Users/bongdary

[I 14:11:57.056 NotebookApp] The Jupyter Notebook is running at:

[I 14:11:57.056 NotebookApp] http://localhost:8888/?token=60742b84f859e15052573a9370ab2afe36cb35c8eb66e2a1

[I 14:11:57.056 NotebookApp]  or http://127.0.0.1:8888/?token=60742b84f859e15052573a9370ab2afe36cb35c8eb66e2a1

[I 14:11:57.056 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

[C 14:11:57.060 NotebookApp] 

    

    To access the notebook, open this file in a browser:

        file:///Users/bongdary/Library/Jupyter/runtime/nbserver-39323-open.html

    Or copy and paste one of these URLs:

        http://localhost:8888/?token=60742b84f859e15052573a9370ab2afe36cb35c8eb66e2a1

     or http://127.0.0.1:8888/?token=60742b84f859e15052573a9370ab2afe36cb35c8eb66e2a1

 

화면이 아래와 같이 잘 열리는 것을 확인 했습니다.

 

반응형