-
Notifications
You must be signed in to change notification settings - Fork 59
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
Use with CondaPkg #480
Comments
One thing that will break using this approach is when moving the project directory the I'm also a bit unclear on whether it is possible for this RCall that points to one project's CondaPkg to accidentally get reused by another project. One thing that would be a bit more robust than the current environment variable approach would be to use |
Here's what I've currently got as a workaround. Put this in
|
Alas, this does not work in Julia 1.9. Now it looks like precompiles happen in a "/tmp" directory, so including src/FixRCall.jl from the module will set R_HOME incorrectly. I'm not sure what the best solution is. Probably reverting to using this as a manual script will work ok. |
After applying this PR all that's needed is to set things up in LocalPreference.toml in the appropriate way. Here is a script to do it automatically:
|
Should this be added to the package so we can use CondaPkg automatically? |
@ParadaCarleton I was thinking I would probably open another PR with it as an extension package once the first is merged. There might still need to be an extra step but that can be figured out later. The current PR is a more generic one to enable configuration through The full current process is as follows from JuliaPy/CondaPkg.jl#100 :
In case you try this and it works for you, could you please mention that it's helpful in the PR? Some social proof might give encourage the maintainers to merge it. |
I am trying to use this together with CondaPkg.jl, which seems to provide a slightly nicer way of managing Conda environments with Julia. In order to use the CondaPkg R, I have tried the following:
If I run this RCall will use R installed through CondaPkg. Yay!. Unfortunately this essentially an extra build step. I tried putting it in my project's
deps/build.jl
, but Pkg isn't available there.It would be nice if it were possible to actually supply a libR for RCall to use for its embedded R rather than having it hard-coded at build time. This would make things a lot more flexible and would mean it would be possible to write a version of
CondaPkg.withenv()
which would setup RCall correctly.The text was updated successfully, but these errors were encountered: