-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to make RCall.jl use a CondaPkg.jl environment? #113
Comments
Short remark: When simple using R, it is probably sufficient to just set ENV["R_HOME"] = CondaPkg.envdir() * "/lib/R" and rebuild RCall (Probably a similar approach also works for PyCall) |
I tried running the following julia> using CondaPkg
julia> ENV["R_HOME"] = CondaPkg.envdir() * "/lib/R"
julia> import Pkg
julia> Pkg.build("RCall")
julia> import RCall
┌ Warning: RCall.jl: During startup - Warning messages:
│ 1: package ‘utils’ in options("defaultPackages") was not found
│ 2: package ‘stats’ in options("defaultPackages") was not found
└ @ RCall ~/.julia/packages/RCall/gOwEW/src/io.jl:172 The CondaPkg environment does not have a proper R setup... I am confused. Any help is highly appreciated Edit: julia> CondaPkg.status()
CondaPkg Status /home/ssahm/Tmp/tmp-julia/condapkg/CondaPkg.toml
Environment
/home/ssahm/Tmp/tmp-julia/condapkg/.CondaPkg/env
Packages
r-base v4.3.1
r-codedepends v0.6.5
r-globals v0.16.2
Channels
bioconda
conda-forge |
@simonbyrne maybe you can help? EDIT: This last error rather looks like this issue could be migrated to RCall.jl actually |
Unfortunately, I'm afraid I haven't looked at RCall.jl for some time, and my bandwidth is rather limited at the moment. |
Perhaps you need to activate the Conda environment in your Julia session first like PythonCall does here: https://github.com/JuliaPy/PythonCall.jl/blob/0056de8711e274b3d8084d19a23fe54adf5d0640/src/cpython/context.jl#L68 |
Thank you for your comments. It turned out it was a linux distribution specific problem which is already reported at anaconda. Concretely you need to have It works now that I've symlinked |
related issue: JuliaInterop/RCall.jl#480 (tries to improve RCall.jl for better integration with CondaPkg.jl without the need of |
this is the final way I am using import CondaPkg
ENV["R_HOME"] = CondaPkg.envdir() * "/lib/R"
import Pkg
Pkg.build("RCall")
using RCall |
Hi,
this package is really really awesome! :)
I would like to also use RCall on top of it, however for this I seem to need
Conda.jl
. Hence I would like to let it make Conda.jl use my current CondaPkg.jl environment.Conda.jl documentation tells:
ENV["CONDA_JL_HOME"]
to the environment (which will become Conda.jl root environment, which should be the one picked up by RCall / PyCall)ENV["CONDA_JL_CONDA_EXE"]
to the executable in order to not install two different condasMy status:
ENV["JULIA_CONDAPKG_ENV"]
, which I already setCondaPkg.MicroMamba.executable()
So it happens by writing this issue, I have solved kind of a couple of steps myself :)
Maybe someone can check whether this makes sense, or whether I overlooked something.
I will try it out myself soon and report in this issue.
The text was updated successfully, but these errors were encountered: