Installing Julia from within R/Python

Hi community,

I’m trying to write a Python/R wrapper for my Julia package. Initially I was following DifferentialEquations.jl’s example via diffeqr and diffeqpy, but I’m encountering major obstacles because:

I want R/Python users to install the R/Python wrappers without ever worrying about installing Julia. Is this requirement too naive?

  • For R, I can’t automatically install Julia with JuliaCall, even though it seems to be a supported feature, see this issue. For what it’s worth, my attempt at building an R wrapper is available here.
  • For Python, I haven’t tried writing a wrapper yet, but in all the examples that I know of (including diffeqpy), the installation instructions always start with first install Julia…

I could recommend Python/R users to first install Julia, but to me that seems quite unattractive. Do I have any other options?

1 Like

With PythonCall Julia will be installed from within Python, like this:

First, install juliacall using the pip package manager, with

% pip install juliacall

Using ipython3 (only Python \geq 3 is supported), do: (not sure if ipython is required here, actually)

In [1]: from juliacall import Main as jl

which, on the first use only, will install the latest stable version of Julia.

(I just copied/pasted these instructions from a package of mine, for which I wrote some instructions to Python users which I think are very easy to follow, using PythonCall).

1 Like