I'm just starting to learn Julia in a windows platform. I've been using for quiet some time python (through miniconda and a virtual environment that I will call from now on p3). Also, I like using VSCode, so I am using the Julia 1.0.0 extension.
One of my first tasks was aimed at creating a simple plot. While I was using the Pkg, to add Plots and PyPlot, I noticed that for the latter the following command was issued: conda install matplotlib
.
Because I use Miniconda (that is the base environment), I initially suspected that the (base) environment was called. However upon closer inspection I realised that in my user folder there was a .julia/conda
folder that contained the data.
So my questions are:
If my questions are too naive/answered elsewhere, then I would appreciate it if you could just point me to the relative documentation/tutorial.
As far as I understand, PyPlot.jl relies on PyCall.jl to run python code. In turn PyCall relies on Conda.jl to manage the python environment.
While Conda.jl allows you to manage several environments, it looks like only the "root" environment will be used by PyCall. The Conda.jl documentation gives a few pointers on how to change the location of this root environment.
So, to answer your questions:
does julia use and maintain a separate conda environment in order to communicate with python?
By default, yes
Is it possible to move the .julia folder (or more specifically the conda folder which tends to get a bit bulky to another directory).
It is possible to move the entire .julia folder by setting the JULIA_DEPOT_PATH environment variable. Or to move only the conda root environment by setting the CONDA_JL_HOME
env var and rebuilding Conda.jl as explained in the link above.
Is it possible to create different conda environments for use within julia?
Not sure I understand your question. If you mean to ask whether there can be multiple possible conda environments and you'd choose which one to use for a particular Julia session, then AFAIU no: everything relying on PyCall will ever use the "root" conda environment.