# Using JuliaC from R/Python?

**URL:** <https://discourse.julialang.org/t/using-juliac-from-r-python/132857>\
**Category:** General Usage\
**Tags:** juliac\
**Created:** [October 3, 2025, 4:30pm UTC](https://discourse.julialang.org/t/using-juliac-from-r-python/132857 "2025-10-03T16:30:31Z")\
**Posts on this page:** 1\
**Showing post:** 7

<div class="post-metadata">

**Author:** ![Palli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/palli/32/3380_2.png) [@Palli](https://discourse.julialang.org/u/Palli)\
**Post date:** [October 11, 2025, 6:46pm UTC](https://discourse.julialang.org/t/using-juliac-from-r-python/132857/7 "2025-10-11T18:46:51Z")

</div>

Note you can already call Julia from R (and e.g. Python), independently of juliac (you can compile in many ways or just skip doing that; C in juliac means compiler not the C language, though in some sense it will also compile Julia code to “C API” usable code):

> [@Bindings/wrappers for Julia packages, how many? From which languages?](https://discourse.julialang.org/t/bindings-wrappers-for-julia-packages-how-many-from-which-languages/132967):
>
> Continuing the discussion from [Wrap Julia package in Python: which is the best option?](https://discourse.julialang.org/t/wrap-julia-package-in-python-which-is-the-best-option/79344): When you wrap a Julia package, as in 2. or 3., yes it’s a wrapper, but also called a binding, when used from another language like Python or R. I’ve used the former word more, but trying to use the technically correct latter word myself (the former needs not be across languages). Those are the two main binding packages I recall (and JuliaCall used for both, pyjulia before, and I believe JuliaCall best to u…

> [@biona001](#):
>
> I’m thinking of compiling 2-3 different julia apps

It seem you mean you want Julia libraries, to call from e.g. an R app? JuliaC can compile apps, yes, but also libraries I understand, and you want the latter? You will not call or “use” juliac from the other languages (so I would clarify the title here), only using once to make a dynamic-link library, and then you can call that library from your other language as easily as calling C.

You don’t need juliac, just to call, e.g. pass a matrix, it’s just if you want a smaller binary (dropping most of the Julia runtime). It seemingly shouldn’t be too hard just even easier with juliacall.

Note the juliacall for Python is very smooth, will download Julia for you, but the juliacall for R is I think more manual (still, could be improved), and note this:

> <https://github.com/JuliaInterop/JuliaCall/issues/263>
>
> My operating system is Ubuntu 24.04.
> 
> To ensure I had the most recent version of… the R package “JuliaCall”, I installed “JuliaCall” from github as follows:
> 
> devtools::install\_github(“JuliaInterop/JuliaCall”)
> 
> The problem is that running julia\_setup() produces a segmentation fault. For example:
> 
> library(JuliaCall)
> julia\_setup(rebuild=TRUE)
> Julia version 1.11.6 at location /home/robert/.julia/juliaup/julia-1.11.6+0.x64.linux.gnu/bin will be used.
> Loading setup script for JuliaCall…
> Finish loading setup script for JuliaCall.
> Segmentation fault (core dumped)
> 
> Any help is much appreciated!

You can use it but you will avoid that issue by using juliac yes. If you just want to use Julia from other languages, as easily as possible (and don’t care from which; first), I would start with from Python, and then you could use juliac after that is working. [You can also use Julia as the main language, with or without compiling a julia app (using e.g. juliac, not the only option to compile!), including to call the other languages, one or even both/any, but didn’t seem what you were after.]

You can have some C library callable from R, I assume easy, you can also have the same library callable from Python, and also if you compile Julia code into a library, it will look more or less like a C library or dynamic link library, so as easy. What I’m not 100% sure if is what are the redundant steps you need for Python vs R, i.e. if some needed, or even if some, or all, can be automated, to make easier to call from both of the languages. I think R is usually calling C++ code, but more common to call C code from Python, then will be more different I think, but I think you can just as easily call C (then also Julia) from R, since C is a (non-strict) subset of C++.

> **[GitHub - TheCedarPrince/InteroperableJuliaBinaries: Experiments in making Julia binaries interoperable...](https://github.com/TheCedarPrince/InteroperableJuliaBinaries#running-from-within-r)**
>
> Experiments in making Julia binaries interoperable within other language C interfaces.

> [@dmbates](#):
>
> I added a comment in [Using rcopy and sexp methods to create a .Call interface to a compiled Julia library · Issue #556 · JuliaInterop/RCall.jl · GitHub](https://github.com/JuliaInterop/RCall.jl/issues/556) with a proof-of-concept for loading a shared library created by juliac into an R session and calling a Julia function from R.

Great! I see a comment from 1 hour ago, and you opened that issue on Feb 27. RCall.jl is well of course for calling R, and its readme has:

> ## Calling Julia from R
> 
> ### See the JuliaCall library to call Julia from R.

But the link to it is failing, I believe it moved, others took over, and needs to point to that… i.e. to [GitHub - JuliaInterop/JuliaCall: Embed Julia in R](https://github.com/JuliaInterop/JuliaCall) and/or to [CRAN: Package JuliaCall](https://cran.r-project.org/web/packages/JuliaCall/index.html) since the former is only almost up-to-date, NEWS at both places have the important 1.17.6 patch release (fixing breakage in Julia), but it’s not under releases at former, for some reason only 1.17.5 so what do you get if installing?

---

_[View the full topic](https://discourse.julialang.org/t/using-juliac-from-r-python/132857)._
