Replies: 2 comments 1 reply
-
Use environment such as virtual environment, then install and record dependencies. python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install jupyter
python3 -m pip freeze > requirements.txt Regarding dependencies, Note that this is not specific to Quarto but rather a general Python question. |
Beta Was this translation helpful? Give feedback.
-
Maybe we should add a link toward virtual environment support for the installation python part ? 🤔 Using virtual environment with Python seems to be one of the safest way to work in project and avoid any conflicts.
Possibly trying to install more system package could be messier in the long run - also because Python code in your document may use recent packages that won't be available as
Definitely a good tool to learn IMO. Quite fast also ! |
Beta Was this translation helpful? Give feedback.
-
Description
On the Quarto website, the recommended setup for rendering Quarto Python documents when using bot jupyterlab and a generic text editor tells us to use pip to install jupyter on Linux.
However, when one tries to use pip to install Python modules on e.g. Ubuntu 24.04, we get the usual error about the Python environment being managed by the distribution, which makes sens as one shouldn't mess up too much with the default Python installation of a system that heavily relies on it, creating a dependency nightmare:
If one wants to use Quarto with the default Python installation, and not mess around with creating separate environments (let's say they are not a particularly advanced Python user and want to stick to whatever
python3-<module_name>
packages are provided by the distribution), what would be the recommended (and minimal) packages to install from the default Ubuntu repositories? Would it be:sudo apt install jupyter
?sudo apt install python3-jupyter-core
?Beta Was this translation helpful? Give feedback.
All reactions