# Quarto and Julia – how to set the python version to use?

**URL:** <https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933>\
**Category:** New to Julia\
**Created:** [January 13, 2023, 6:25pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933 "2023-01-13T18:25:10Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 13, 2023, 6:25pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/1 "2023-01-13T18:25:10Z")

</div>

I am not new to Julia, but I struggle every time I have to use Python, since I feel that I have so many versions of Python installed (Anaconda, Conda, Conda.jl), that I am not sure when which version is called.

If I just follow the Quarto installation instructions (Quarto installed with Homebrew)

> **[Quarto - Using Julia](https://quarto.org/docs/computations/julia.html)**

and have a minimal file like

````julia
# Hi

```{julia}
println("Hi")
```

````

as `test.qmd`

calling (in the same folder) `quarto render test.qmd` yields

```julia
Starting julia-1.8 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 17, in <module>
    from nbclient import NotebookClient
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/nbclient/ __init__.py", line 6, in <module>
    from .client import NotebookClient, execute # noqa: F401
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/nbclient/client.py", line 14, in <module>
    from jupyter_client import KernelManager
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/jupyter_client/ __init__.py", line 6, in <module>
    from .asynchronous import AsyncKernelClient # noqa
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/jupyter_client/asynchronous/ __init__.py", line 1, in <module>
    from .client import AsyncKernelClient # noqa
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/jupyter_client/asynchronous/client.py", line 6, in <module>
    from jupyter_client.channels import HBChannel
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/jupyter_client/channels.py", line 12, in <module>
    import zmq.asyncio
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/ __init__.py", line 103, in <module>
    from zmq import backend
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/ __init__.py", line 32, in <module>
    raise original_error from None
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/ __init__.py", line 27, in <module>
    _ns = select_backend(first)
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/select.py", line 32, in select_backend
    mod = import_module(name)
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/importlib/ __init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/cython/ __init__.py", line 6, in <module>
    from . import (
ImportError: dlopen(/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/cython/constants.cpython-38-darwin.so, 0x0002): tried: '/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/cython/constants.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')), '/System/Volumes/Preboot/Cryptexes/OS/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/cython/constants.cpython-38-darwin.so' (no such file), '/Users/ronnber/.julia/conda/3/lib/python3.8/site-packages/zmq/backend/cython/constants.cpython-38-darwin.so' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))

```

sadly, I usually fight so much getting Python stuff to run at all, that I am a little lost where to start checking what is going wrong here. Any tipps would be helpful. It seems it’s an x86 Python and I need an M1-one on my Mac? How would I tell that to Conda.jl?

---

<div class="post-metadata">

**Author:** ![lferrant](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lferrant/32/22751_2.png) [@lferrant](https://discourse.julialang.org/u/lferrant)\
**Post date:** [January 13, 2023, 6:35pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/2 "2023-01-13T18:35:46Z")

</div>

apparently there are quite some issues with quarto and julia \> 1.8.3

> <https://github.com/quarto-dev/quarto-cli/issues/2539>
>
> \### Bug description
> 
> Hi, I am hitting this error, trying to render a .qmd file, …using Quarto in PowerShell (same with VSCode) on Windows 10. I can use the julia-1.7 kernel in jupyter lab, no probs. And I can render a .qmd using the python3 kernel in quarto
> \`\`\`
> Starting julia-1.7 kernel...Traceback (most recent call last):
> File "C:\\Program Files\\Quarto\\share\\jupyter\\jupyter.py", line 21, in \<module\>
> from notebook import notebook\_execute, RestartKernel
> File "C:\\Program Files\\Quarto\\share\\jupyter\\notebook.py", line 17, in \<module\>
> from nbclient import NotebookClient
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\nbclient\\\_\_init\_\_.py", line 6, in \<module\>
> from .client import NotebookClient, execute # noqa: F401
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\nbclient\\client.py", line 14, in \<module\>
> from jupyter\_client import KernelManager
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\\_\_init\_\_.py", line 6, in \<module\>
> from .asynchronous import AsyncKernelClient # noqa
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\asynchronous\\\_\_init\_\_.py", line 1, in \<module\>
> from .client import AsyncKernelClient # noqa
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\asynchronous\\client.py", line 6, in \<module\>
> from jupyter\_client.channels import HBChannel
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\jupyter\_client\\channels.py", line 12, in \<module\>
> import zmq.asyncio
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\\_\_init\_\_.py", line 103, in \<module\>
> from zmq import backend
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\\_\_init\_\_.py", line 31, in \<module\>
> raise original\_error from None
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\\_\_init\_\_.py", line 26, in \<module\>
> \_ns = select\_backend(first)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\select.py", line 31, in select\_backend
> mod = import\_module(name)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\importlib\\\_\_init\_\_.py", line 127, in import\_module
> return \_bootstrap.\_gcd\_import(name\[level:\], package, level)
> File "C:\\Users\\arn203\\.julia\\conda\\3\\lib\\site-packages\\zmq\\backend\\cython\\\_\_init\_\_.py", line 6, in \<module\>
> from . import (
> ImportError: DLL load failed while importing \_device: The specified module could not be found.
> \`\`\`
> I'm pretty lost with this at this point! Any help would be much appreciated.
> 
> \### Checklist
> 
> \- \[\] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
> \- \[X\] Please \[format your issue\](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
> \- \[\] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
> \- \[X\] Please document the operating system you're running. If on Linux, please provide the specific distribution.

I couldnt get quarto to work either, in the end what I ended up doing was removing `IJulia`, start a julia session with v1.8.3 and reinstall and rebuild `IJulia` again.

Your error looks different than what I got before though. I can `quarto render` your MWE with my hacked setup. What julia version do you use?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 13, 2023, 6:53pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/3 "2023-01-13T18:53:03Z")

</div>

I am always on a very recent one, currently 1.8.4. – The problem you mention seems not to be the problem, I think, but I will check the next days with 1.7 maybe.

---

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [January 13, 2023, 8:14pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/4 "2023-01-13T20:14:12Z")

</div>

I would use the Conda package for Julia to check that you have the jupyter package installed.

```julia
import Conda
Conda.add("jupyter")
Conda.update()
Conda.clean(; sources=false);

```

I believe that quarto just needs the environment variable `QUARTO_PYTHON` set to, in your case, `"Users/ronnber/.julia/conda/3/bin/python3"` but, as you say, frequently there are so many different versions of Python and Conda and pip floating around that things get confused.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 13, 2023, 8:57pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/5 "2023-01-13T20:57:36Z")

</div>

Cool, that did the trick! I would not have guessed that from the strange error message that mentioned more like things with different architectures.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 16, 2023, 8:01am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/6 "2023-01-16T08:01:49Z")

</div>

I have a followup problem which might even bar the same. Me fighting Python versions.

Now quarto just always starts a python kernel though I specified Julia, I think it might be because it switched (but I have no clue how or why) to some other Python version (I feel I have about a dozen installed since every small software brings its own Python), but I can not figure out how to tell quarto to use the Conda.jl one?

_edit:_ Deleting both packages and quarto – and reinstalling them again fixed the issue.

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [January 16, 2023, 10:13am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/7 "2023-01-16T10:13:38Z")

</div>

Is there a best order to re-install? Quarto first, then the packages, or the reverse?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 16, 2023, 10:22am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/8 "2023-01-16T10:22:46Z")

</div>

I don’t know about _best_. Mine now was

1. Quarto
2. Conda
3. IJulia

---

<div class="post-metadata">

**Author:** ![jdad](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jdad/32/4739_2.png) [@jdad](https://discourse.julialang.org/u/jdad)\
**Post date:** [January 16, 2023, 10:36am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/9 "2023-01-16T10:36:33Z")

</div>

Thanks!

---

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [January 16, 2023, 4:39pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/10 "2023-01-16T16:39:45Z")

</div>

In a discussion with the Quarto folks they suggested setting the environment variable `QUARTO_PYTHON` to point to the executable, such as `~/.julia/conda/3/bin/python3`. The `jupyterCapabilities` function defined in `bin/quarto.js` from the Quarto 1.2.313 installation explicitly looks for the python in `~/.julia/conda/3/bin/` so I am not sure if this is needed now.

What version of Quarto do you have installed?

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 16, 2023, 5:03pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/11 "2023-01-16T17:03:42Z")

</div>

ah, that might also have been a reason, I do set the `QUARTO_PYTHON` as you suggested, but it still only worked after the new install.

I installed with brew ( [quarto — Homebrew Formulae](https://formulae.brew.sh/cask/quarto) ) so it should be `1.2.313`.

---

<div class="post-metadata">

**Author:** ![camilogarciabotero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/camilogarciabotero/32/35000_2.png) [@camilogarciabotero](https://discourse.julialang.org/u/camilogarciabotero)\
**Post date:** [January 16, 2023, 5:09pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/12 "2023-01-16T17:09:42Z")

</div>

Hi,

I’ve alternatively been using [`JuliaCall`](https://github.com/Non-Contradiction/JuliaCall) R package. [Here are some demos](https://github.com/quarto-dev/quarto-cli/discussions/2506). The experience in Rstudio is nice, and in VSCode is good. What I’ve found is that is lighter and works directly without setting explicitly an `engine` in the `YAML` header. It works directly from the `engine: knitr`. Maybe there might be some improvements later.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 16, 2023, 5:20pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/13 "2023-01-16T17:20:28Z")

</div>

…but then I have to install `R`?

---

<div class="post-metadata">

**Author:** ![dmbates](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/dmbates/32/44_2.png) [@dmbates](https://discourse.julialang.org/u/dmbates)\
**Post date:** [January 16, 2023, 6:57pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/14 "2023-01-16T18:57:34Z")

</div>

The problem for me with `JuliaCall` is that I am less confident in JuliaCall than in Jupyter/IJulia as an evaluation engine.

Because Julia is a very rich language and the ccall interface can deal with more-or-less any C API, it is possible to mimic the R data types and evaluation process in Julia, which is what the Julia package `RCall` does. That package is 100% Julia code and wraps the entire C API for R. All of the conversions to/from R from/to Julia are performed in Julia code.

JuliaCall, on the other hand, has to go through C++ code called from R to start and communicate with the Julia process and, in fact, relies on the RCall package for Julia to do much of the conversion of data types.

To me using RStudio and JuliaCall introduces a lot more moving parts in the whole assembly and increases the chance of things failing. I would expect evaluation through Jupyter/IJulia to be more robust.

---

<div class="post-metadata">

**Author:** ![camilogarciabotero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/camilogarciabotero/32/35000_2.png) [@camilogarciabotero](https://discourse.julialang.org/u/camilogarciabotero)\
**Post date:** [January 16, 2023, 8:17pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/15 "2023-01-16T20:17:58Z")

</div>

Sure… But no need of `conda`, `Conda.jl` and `IJulia.jl` on the other hand.

---

<div class="post-metadata">

**Author:** ![camilogarciabotero](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/camilogarciabotero/32/35000_2.png) [@camilogarciabotero](https://discourse.julialang.org/u/camilogarciabotero)\
**Post date:** [January 16, 2023, 8:19pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/16 "2023-01-16T20:19:47Z")

</div>

Oh I see, I didn’t know all the internals

---

<div class="post-metadata">

**Author:** ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Post date:** [January 17, 2023, 10:53am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/17 "2023-01-17T10:53:48Z")

</div>

Although the original problem seems to be solved now, I am also experiencing an issue that is best described by the title of this topic. Therefore after some hesitation I decided not to open a new topic and instead describe my issue here. But it could possibly be moved to a separate topic.

In particular, I am hitting my head against the wall with how to tell Quarto within vscode to use the right version of Python (on macOS). As a new user of macOS (having switched from Linux), I am unable to get out from the mess of multiple installations of Python on my system. In particular, when clicking on the Render button in vscode for some demo Julia-based qmd file, this is what I get in the terminal within vscode:

```julia
quarto preview ~/tmp/demo.qmd --no-browser --no-watch-inputs
ERROR: Jupyter kernel 'julia-1.8' not found.

```

When typing `quarto check` in the (same) vscode terminal, I get

```julia
➜ tmp quarto check

[✓] Checking Quarto installation......OK
      Version: 1.1.251
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.11.1
      Path: /opt/homebrew/opt/python@3.11/bin/python3.11
      Jupyter: (None)

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

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

```

Now, checking version of Python installed on my computer through homebrew:

```julia
➜ ~ ls -al /opt/homebrew/opt | grep python
lrwxr-xr-x 1 hurak admin 23 3 led 19:04 ipython -> ../Cellar/python/8.8.0
lrwxr-xr-x 1 hurak admin 23 3 led 19:04 ipython@8 -> ../Cellar/ipython/8.8.0
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python3 -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python@3 -> ../Cellarpython@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python@3.10 -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 4 led 17:08 python@3.11 -> ../Cellar/python@3.11/3.11.1

```

Obviously, `python3` is symlinked to the version 3.10.9. But when calling Quarto from within vscode, a different version 3.11.1 is called instead.

If I now call quarto outside of vscode in a separate terminal, everything is fine:

```julia
Last login: Tue Jan 17 11:19:00 on ttys004
➜ ~ quarto check

[✓] Checking Quarto installation......OK
      Version: 1.1.251
      Path: /Applications/quarto/bin

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

[✓] Checking Python 3 installation....OK
      Version: 3.10.9
      Path: /opt/homebrew/opt/python@3.10/bin/python3.10
      Jupyter: 5.1.2
      Kernels: julia-1.8

      NOTE: No Jupyter kernel for Python found

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

```

Typing `quarto preview demo.qmd` finds and starts the `julia-1.8 kernel` without troubles.

I am unable to identify if this is an homebrew issue or vscode issue or Quarto issue.

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 17, 2023, 12:28pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/18 "2023-01-17T12:28:18Z")

</div>

Which Python version do you have in mind to use? The one from `Conda.jl`? Then see the `QUARTO_PATH` remark above 🙂 That helped me (though my quarto by default picked not the home-brew but my anaconda version).

---

<div class="post-metadata">

**Author:** ![zdenek\_hurak](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/zdenek_hurak/32/53118_2.png) [@zdenek\_hurak](https://discourse.julialang.org/u/zdenek_hurak)\
**Post date:** [January 17, 2023, 3:30pm UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/19 "2023-01-17T15:30:47Z")

</div>

I actually wanted to use what is already installed through homebrew (why duplicating Python installations though Conda?). And it appears that setting `QUARTO_PYTHON` was really the way to go.

Sort of. Now if I click Render button in vscode to produce a preview, it does the job.

But the strange thing is that in the vscode-tied Quarto terminal I get a warning that what I specified through `QUARTO_PYTHON`

```julia
export QUARTO_PYTHON=/opt/homebrew/opt/python3

```

does not exist:

```julia
(|) Checking Python 3 installation....WARNING: Specified QUARTO_PYTHON '/opt/homebrew/opt/python3' does not exist.
[✓] Checking Python 3 installation....OK
      Version: 3.10.9
      Path: /opt/homebrew/opt/python@3.10/bin/python3.10
      Jupyter: 5.1.2
      Kernels: julia-1.8

      NOTE: No Jupyter kernel for Python found

```

while it certainly does exist

```julia
➜ ~ ls -al /opt/homebrew/opt | grep python
lrwxr-xr-x 1 hurak admin 23 3 led 19:04 ipython -> ../Cellar/ipython/8.8.0
lrwxr-xr-x 1 hurak admin 23 3 led 19:04 ipython@8 -> ../Cellar/ipython/8.8.0
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python3 -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python@3 -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 14 led 12:30 python@3.10 -> ../Cellar/python@3.10/3.10.9
lrwxr-xr-x 1 hurak admin 28 4 led 17:08 python@3.11 -> ../Cellar/python@3.11/3.11.1

```

It appears that if `QUARTO_PYTHON` is now specified, then if for some reason the system cannot use it, it falls back to the system default

```julia
➜ ~ python3 --version
Python 3.10.9

```

which is however exactly what I attempted to specify through `QUARTO_PATH`

```julia
➜ ~ which python3
/opt/homebrew/bin/python3

```

To conclude, I can certainly pursue to the Conda path, I before resorting to installing yet another Python in this way, I just tried to direct Quarto to use what is already installed on the system through Homebrew. With several versions of Python installed through Homebrew, I struggled to tell Quarto to use the one that is symlinked to `python3`. While setting `QUARTO_PATH` the system complains that it cannot find the specified thing, still Quarto now picks the system symlinked version of Python. I can easily leave it at this because functionality is now achieved (even if understanding is still unachieved:-)

---

<div class="post-metadata">

**Author:** ![kellertuer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kellertuer/32/220707_2.png) [@kellertuer](https://discourse.julialang.org/u/kellertuer)\
**Post date:** [January 18, 2023, 8:15am UTC](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933/20 "2023-01-18T08:15:43Z")

</div>

I think you have a typo in your

```julia
export QUARTO_PYTHON=/opt/homebrew/opt/python3

```

which should be

```julia
export QUARTO_PYTHON=/opt/homebrew/bin/python3

```

as your `which` indicates (note the change of the second **opt** to **bin** ). And sure these tiny differences are sometimes hard to spot 😉

[Next page](https://discourse.julialang.org/t/quarto-and-julia-how-to-set-the-python-version-to-use/92933.md?page=2)
