How to work with Grass and Quarto in Jupyter?

Hi!

I’m doing this issue and having trouble using Quarto and GRASS GIS in the same Jupyter notebook. I’ve tried several approaches unsuccessfully, and I’d appreciate your help.

Here’s what I’ve tried:

Install in Visual Studio Code
I installed Quarto in VSCode and created a Quarto file using Jupyter, but I can’t use GRASS GIS within the project.

Install in GRASS GIS Juyter Lab
I installed GRASS GIS, ran its shell, and opened JupyterLab, but when I tried to install Quarto inside JupyterLab, it didn’t work.

So, I installed Quarto inside a Jupyter Notebook, and it worked fine. However, when I used the command quarto convert quarto_grass_test.qmd, I see that I can’t access the terminal in JupyterLab to run this command.

Please guide me through resolving these issues using Quarto and GRASS GIS in the same Jupyter Notebook. I would greatly appreciate for your insights.

Thanks!

You need to add GRASS to your Python path before importing the GRASS Python modules.

Try following the example here.

https://grass-tutorials.osgeo.org/content/tutorials/get_started/JupyterOnWindows_OSGeo4W_Tutorial.html

1 Like

And if you want to work with Quarto in RStudio, you also need to make sure that the Python path is correct in RStudio global settings. This can be an issue if you installed Jupyter via Anaconda.