Code Monkey home page Code Monkey logo

Comments (8)

simonbyrne avatar simonbyrne commented on June 21, 2024 1

Unfortunately, I'm afraid I haven't looked at RCall.jl for some time, and my bandwidth is rather limited at the moment.

from condapkg.jl.

cjdoris avatar cjdoris commented on June 21, 2024 1

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

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

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)

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

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: CondaPkg.status() looks good

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

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

@simonbyrne maybe you can help?

EDIT: This last error rather looks like this issue could be migrated to RCall.jl actually

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

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 /usr/bin/which available on your system for R...

It works now that I've symlinked /usr/bin/which

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

related issue: JuliaInterop/RCall.jl#480 (tries to improve RCall.jl for better integration with CondaPkg.jl without the need of Pkg.build("RCall"))

from condapkg.jl.

schlichtanders avatar schlichtanders commented on June 21, 2024

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)

this is the final way I am using

import CondaPkg
ENV["R_HOME"] = CondaPkg.envdir() * "/lib/R"
import Pkg
Pkg.build("RCall")
using RCall

from condapkg.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.