quarto-dev / quarto-dev/quarto-cli
No module named 'nbformat'
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 6k
- Forks
- 458
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 41
Description
Bug description
First of all I want to clarify that this is my first post here, I apologize if it's not completely clear.
Once I got to know Quarto I wanted to start experimenting with it working with Python, however, I have not been able to because the nbformat package is not installed. However, when I check the list of installed packages this package appears there in both the conda and pip package lists. Can anyone tell me what the problem is? I have tried RStudio and VS code but I have the same issue with both.
OS: Ubuntu 20.04.4 LTS
RStudio Version: 2022.07.1
VS code Version: 1.70.1
Console output when I want to Render the document:
(base) ..$ quarto preview quarto_test.qmd --to html --no-browser --no-watch-inputs
Starting python3 kernel...Traceback (most recent call last):
File "/opt/quarto/share/jupyter/jupyter.py", line 21, in
from notebook import notebook_execute, RestartKernel
File "/opt/quarto/share/jupyter/notebook.py", line 16, in
import nbformat
ModuleNotFoundError: No module named 'nbformat'
nbformat package in pip list:
- nbformat 5.4.0
nbformat package in conda list:
- nbformat 5.4.0 pypi_0 pypi
qmd file content:
title: "Quarto test"
author: "Andrés Silva"
format:
html
jupyter: python3
Quarto
Quarto enables you to weave together content and executable code into a finished docquartoument. To learn more about Quarto see https://quarto.org.
Running Code
When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:
1 + 1
You can add options to executable code like this
#| echo: false
2 * 2
The echo: false option disables the printing of code (only output is displayed).
quarto check Output
[✓] Checking Quarto installation......OK
Version: 1.0.38
Path: /opt/quarto/bin
[✓] Checking basic markdown render....OK
[✓] Checking Python 3 installation....OK
Version: 3.9.5 (Conda)
Path: /home/afsilvad/miniconda3/bin/python
Jupyter: 4.10.0
Kernels: python3
[✓] Checking Jupyter engine render....OK
[✓] Checking R installation...........OK
Version: 4.2.1
Path: /usr/lib/R
LibPaths:
- /home/afsilvad/R/x86_64-pc-linux-gnu-library/4.2
- /usr/local/lib/R/site-library
- /usr/lib/R/site-library
- /usr/lib/R/library
rmarkdown: 2.14
[✓] Checking Knitr engine render......OK
quarto tools check Output
Tool Status Installed Latest
chromium Not installed --- 869685
tinytex Not installed --- v2022.08
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported quarto preview command and compare the Python interpreter used by Quarto with the environment where nbformat is installed. Inspect /opt/quarto/share/jupyter/jupyter.py and notebook.py, using the quarto check output as context. Done means the reported environment mismatch is understood and the Jupyter render either succeeds or produces a clear diagnostic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, python
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100