quarto-dev / quarto-dev/quarto-cli

"Jupyter is not available in this Python installation" when using pipx

Open
#11,804 14 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

engines-jupyter third-party
Dominant language
JavaScript
Stars
6k
Forks
458
Avg merge
1d 9h
Merged PRs (30d)
41

Description

Bug description

I use pipx to install python stuff (https://github.com/pypa/pipx). Jupyterlab works just fine, and in VScode I am able to select kernels installed this way no problem. However, when I run quarto render on a jupyter notebook, I get the following error:

quarto render r-notebook.ipynb --execute

Starting ir kernel...Traceback (most recent call last):
  File "/Applications/quarto/share/jupyter/jupyter.py", line 21, in <module>
    from notebook import notebook_execute, RestartKernel
  File "/Applications/quarto/share/jupyter/notebook.py", line 15, in <module>
    from yaml import safe_load as parse_string
ModuleNotFoundError: No module named 'yaml'
Python 3 installation:
  Version: 3.13.1
  Path: /opt/homebrew/opt/python@3.13/bin/python3.13
  Jupyter: (None)

Jupyter is not available in this Python installation.
Install with python3 -m pip install jupyter

Jupyter is globally accessible to all environments:

> pipx list
venvs are in /Users/venpopov/.local/pipx/venvs
apps are exposed on your $PATH at /Users/venpopov/.local/bin
manual pages are exposed at /Users/venpopov/.local/share/man
   package jupyterlab 4.3.4, installed using Python 3.13.1
    - debugpy
    - httpx
    - ipython
    - ipython3
    - jlpm
    - jsonpointer
    - jsonschema
    - jupyter
    - jupyter-dejavu
    - jupyter-events
    - jupyter-execute
    - jupyter-kernel
    - jupyter-kernelspec
    - jupyter-lab
    - jupyter-labextension
    - jupyter-labhub
    - jupyter-migrate
    - jupyter-nbconvert
    - jupyter-run
    - jupyter-server
    - jupyter-troubleshoot
    - jupyter-trust
    - normalizer
    - pybabel
    - pygmentize
    - pyjson5
    - send2trash
    - wsdump
    - man1/ipython.1
   package notebook 7.3.2, installed using Python 3.13.1
    - jupyter-notebook
   package radian 0.6.13, installed using Python 3.13.1
    - radian

commands like jupyter work just fine in any terminal and VScode. It seems that quarto CLI tool is making erroneous assumptions about how to check for the presence of jupyter.

Steps to reproduce

the following installs jupyterlab via pipx

pipx install jupyterlab --include-deps
Expected behavior

quarto CLI should recognize the globally accessible jupyter installation

Actual behavior

No response

Your environment
  • zsh terminal
  • MacOS Sonoma
Quarto check output

Quarto 1.6.39
[✓] Checking environment information...
Quarto cache location: /Users/venpopov/Library/Caches/quarto
[✓] Checking versions of quarto binary dependencies...
Pandoc version 3.4.0: OK
Dart Sass version 1.70.0: OK
Deno version 1.46.3: OK
Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
Version: 1.6.39
Path: /Applications/quarto/bin

[✓] Checking tools....................OK
TinyTeX: (not installed)
Chromium: (not installed)

[✓] Checking LaTeX....................OK
Tex: (not detected)

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
Version: 3.13.1
Path: /opt/homebrew/opt/python@3.13/bin/python3.13
Jupyter: (None)

  Jupyter is not available in this Python installation.
  Install with python3 -m pip install jupyter

[✓] Checking R installation...........OK
Version: 4.4.2
Path: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources
LibPaths:
- /Users/venpopov/Library/R/arm64/4.4/library
- /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/library
knitr: 1.49
rmarkdown: 2.29

[✓] Checking Knitr engine render......OK

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with pipx install jupyterlab --include-deps, then run quarto render r-notebook.ipynb --execute. Start by reading /Applications/quarto/share/jupyter/jupyter.py and notebook.py, where the reported import failure occurs. Done means Quarto recognizes the pipx-installed Jupyter environment and renders the notebook successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter, python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.