from juliacall import Main as jl
import numpy as np
jl.seval("using Plots")
jl.display(jl.plot(np.random.randn(100)))
rjl=jl.plot(np.random.randn(100))
jl.display(rjl)
Is it possible to have IJulia
and CondaPkg
both available without creating more than one Conda instance?
I may be misunderstanding how these packages interact so let me describe my situation. I use quarto for creating documents, presentations, etc. (see, e.g., section2 of Julia Workshop - Julia Workshop for Data Science). The evaluation engine for Julia code blocks in quarto is jupyter. Thus I need to have a Julia kernel specification in my Jupyter environment, which, in practice, means having IJulia.jl installed, and that package depends on Conda.jl. If I add PythonCall.jl and CondaPkg.jl to my project, will I end up with two separate instances of Conda?
IJulia doesn’t need you to have a Conda distro installed at all. Just launch jupyter
yourself using whatever method you want.
The Conda.jl package is extremely lightweight — it doesn’t install any Python distro unless you explicitly ask it to. (Or if some other package that you install asks it to.)
For example, running IJulia.jupyter()
asks you if you want to install a Conda distro to get jupyter
. But you don’t need this if you launch jupyter
in some other way.
This looks great! A significant improvement in JuliaCall compared to py-julia is it does not require a custom Python be compiled on the host!