quarto-dev / quarto

Quarto open-source scientific and technical publishing system
https://quarto.org
GNU Affero General Public License v3.0
280 stars 19 forks source link

VSCode Quarto preview not picking up `venv` #406

Open gsingh91 opened 2 months ago

gsingh91 commented 2 months ago

I am building a quarto markdown using a virtual environment(venv). When I run quarto preview using the preview button, it opens up a new terminal(which does not have the virtual environment activated) and fails to render. It does work if I directly use the quarto preview command in the venv activated terminal. My assumption is that the preview button should also honor the virtual environment.

qv

cderv commented 2 months ago

In VSCODE the environment used will be the one selected with the Python extension. Could you check with Python do you have configured with your VSCODE for this project ?

image

I can't see on your gif because of resolution but if another environment is selected then the quarto extension will respect this one (which will also be used for any code cell interactive execution in vscode which will use the Python Extension)

Hope it helps