-
Notifications
You must be signed in to change notification settings - Fork 331
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"Jupyter is not available in this Python installation" when using pipx #11804
Comments
Can you share result of # short version
jupyter kernelspec list
# long version
jupyter kernelspec list --json Also can you run This should give us some trace information about kernel detection. Maybe Quarto automatic detection does not account for a pipx installation and this should be improved. 🤔 What is done exactly by Quarto is not really looking for So, in your situation
So there is something related to using pipx and Quarto together. 🤔
Thanks for the feedback. Waiting for your additional input now. Thanks ! |
I don't know exactly how pipx works, but I think it is meant to be execute some provided executable. What quarto do is equivalent to Quarto does not call Jupyter.exe you have on PATH. So it is not expected to work with a pipx jupyter install. It needs to use a python version that have Jupyter and dependencies available.
What drives the use of pipx to use with Quarto ? Is this global install of jupyter, and then multiple python kernel for each project ? I assume the notebook used with Quarto will require some python packages that needs to be available within the python environment. How does this work if you use pipx ? Hope it helps understand the situation here. |
Thanks for looking into it. Here is the output you requested:
and
from
|
I recently reinstalled my system and started using pipx to install python-based applications that are globally accessible. For Jupyter for example from this tutorial. I would still need to create virtual environments for projects where I would install specific packages to use in the code, but applications such as jupyter become globally accessible. pipx puts applications into separate venvs:
and them symlinks their executables to a folder on the path:
|
To be honest, this is a new computer setup, so I was just starting to see how it would work with Quarto. For now, I have installed an R kernel, and I am able to set it up just fine in VSCode as the kernel for a notebook, and I can execute code and run the notebook. The problem occurs only when I try to use quarto to render the notebook or convert it. I have previously used quarto only with .qmd files and have worked with jupyter notebooks without quarto a few times before - it's the first time I'm trying to use the two together. |
Did you try use the python version of those virtual env with Quarto ? Activate this env for your doc, and then To execute the code in the cell, the virtual env with associated package will need to be accessible. |
I have not yet. My workflow is almost entirely R-based and I use ‘renv’ instead of virtual environments with quarto projects. My attempts to shoehorn in Jupyter notebooks in this workflow is because of this thread: posit-dev/positron#1533 (comment) where @juliasilge says that:
and that “converting is quite straightforward” which in my experience trying to set it up now doesn’t seem to be My workflow is almost entire R based. I vastly prefer the editing experience of .qmd files, but inline outputs of jupyter notebooks is a big quality of life improvement during rapid prototyping. Is there a way to continue using renv for dependency management without adding redundant virtual environments on top just to use jupyter? |
As far my statement about converting being straightforward, that turned out to be not true upon deeper experience; for example, see #9463. |
I tried it now and running into issues with packages. I did the following:
then
so I install pyyaml via
when I install that, i get another error about missing
At that point rendering works fine. So I will need to install pyyaml, nbformat and nbclient for each environment? |
(disclosure: I don't know how pipx works) Note that |
As I said, quarto will run something like Current workflow is
This is our currently documented way with virtualenv: https://quarto.org/docs/projects/virtual-environments.html#using-venv Another path is to install Quarto inside the virtual env (as mentioned just above: #11804 (comment)) and this will install all necessary dependencies. pipx being a tool to install in isolated environment some executable provided in python package, maybe using pipx and quarto is installing Quarto with pipx Not sure if Quarto will use the same python version as the isolated venv it would have been installed in though. |
Thanks for the detailed suggestions. I will do some experimentation and report back |
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 runquarto render
on a jupyter notebook, I get the following error:Jupyter is globally accessible to all environments:
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
Expected behavior
quarto CLI should recognize the globally accessible jupyter installation
Actual behavior
No response
Your environment
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/[email protected]/bin/python3.13
Jupyter: (None)
[✓] 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
The text was updated successfully, but these errors were encountered: