jupyter - 尝试打开 jupyter 笔记本时出现 nbformat 错误
问题描述
我正在尝试在 macOS Mojave 中安装 Jupyter Notebook。
我已经尝试过使用 Anaconda,但是虽然 anaconda3 显然安装得很好,但在我的 bash 中使用了正确的路径,我得到:
$ jupyter notebook
-bash: jupyter: command not found
我也试过
python3 -m pip install --upgrade pip
python3 -m pip install jupyter
但是在我尝试打开后,jupyter notebook
我收到了这个错误:
$ jupyter notebook
Traceback (most recent call last):
File "/Users/danielavargasrobles/miniconda3/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/Users/danielavargasrobles/miniconda3/lib/python3.6/site-packages/notebook/notebookapp.py", line 83, in <module>
from .services.contents.manager import ContentsManager
File "/Users/danielavargasrobles/miniconda3/lib/python3.6/site-packages/notebook/services/contents/manager.py", line 17, in <module>
from nbformat import sign, validate as validate_nb, ValidationError
ModuleNotFoundError: No module named 'nbformat'
有谁知道发生了什么?谢谢!
解决方案
您是否在环境中安装了 jupyter ?我有一个类似的问题,jupyter 正在启动,因为安装在 venv 外部但未安装在您的环境中,这将导致 nbformat 问题。
conda activate your_env
conda install jupyter
应该做的伎俩。
推荐阅读
- javascript - 当循环通过 HtmlTableElement 并转换为 json 时,它只转换第一个表 json object.but 不转换 socond object
- java - SpringBoot Rest Controller中与Jackson@JsonIgnore合作MongoDB延迟加载
- angular - 事件发射多级策略
- angular - Angular 7 observables 传递给子组件部分工作
- javascript - es6方法中函数内部的This值
- micronaut - 上传文本文件槽 REST 控制器
- python - 了解 LSTM ANN 中的某些参数,例如“回顾”、“时间步长”
- python - re.compile().match 在 win10 和 ubuntu 上使用 python3 的不同结果
- azure-devops - 未找到具有指定模式的包:d:\a\r1\a\**\*.zip -- 解决方案
- reactjs - 为什么我得到 NaN ?应用程序似乎可以工作,但起点是 NaN。我该如何解决这个问题?