ImportError: cannot import name 'ensure_dir_exists'

jupyter notebook重裝或更新後,執行jupyter notebook出現如下錯誤:

Traceback (most recent call last):
  File "/home/cc/install/anaconda3/bin/jupyter-notebook", line 7, in <module>
    from notebook.notebookapp import main
  File "/home/cc/install/anaconda3/lib/python3.6/site-packages/notebook/__init__.py", line 25, in <module>
    from .nbextensions import install_nbextension
  File "/home/cc/install/anaconda3/lib/python3.6/site-packages/notebook/nbextensions.py", line 27, in <module>
    from jupyter_core.utils import ensure_dir_exists
ImportError: cannot import name 'ensure_dir_exists'

解決辦法:升級jupyter_core和jupyter_client

conda update jupyter_core jupyter_client

其他解決辦法:https://stackoverflow.com/questions/48372019/importerror-cannot-import-name-ensure-dir-exists

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章