# Installing Julia from within R/Python

**URL:** <https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363>\
**Category:** General Usage\
**Tags:** question\
**Created:** [June 14, 2023, 8:26pm UTC](https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363 "2023-06-14T20:26:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![biona001](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/biona001/32/16497_2.png) [@biona001](https://discourse.julialang.org/u/biona001)\
**Post date:** [June 14, 2023, 8:26pm UTC](https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363/1 "2023-06-14T20:26:56Z")

</div>

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](https://github.com/SciML/DifferentialEquations.jl) and [diffeqpy](https://github.com/SciML/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](https://github.com/Non-Contradiction/JuliaCall), even though it seems to be a supported feature, [see this issue](https://github.com/Non-Contradiction/JuliaCall/issues/198). For what it’s worth, my attempt at building an R wrapper is available [here](https://github.com/biona001/knockoffsr).
- 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?

---

<div class="post-metadata">

**Author:** ![lmiq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lmiq/32/18314_2.png) [@lmiq](https://discourse.julialang.org/u/lmiq)\
**Post date:** [June 15, 2023, 12:41am UTC](https://discourse.julialang.org/t/installing-julia-from-within-r-python/100363/2 "2023-06-15T00:41:56Z")

</div>

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

First, install `juliacall` using the `pip` package manager, with

```bash
% pip install juliacall

```

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

```python
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](https://m3g.github.io/CellListMap.jl/stable/python/), for which I wrote some instructions to Python users which I think are very easy to follow, using PythonCall).
