# Unable to build PyCall and RCall

**URL:** <https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439>\
**Category:** New to Julia\
**Created:** [January 3, 2023, 3:13am UTC](https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439 "2023-01-03T03:13:42Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![probit2011](https://avatars.discourse-cdn.com/v4/letter/p/919ad9/32.png) [@probit2011](https://discourse.julialang.org/u/probit2011)\
**Post date:** [January 5, 2023, 3:54am UTC](https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439/21 "2023-01-05T03:54:01Z")

</div>

By the way, the `Scripts\\conda.exe` was located in `C:\Users\probi\miniconda3` after I installed it with the GUI.

Now, the last problem is to build RCall. I get the exact same error messages as for PyCall (conda does not build properly). I tried the `ENV["R_HOME"] = "*"` trick from the tutorial, but it doesn’t work. Where would I find the proper .exe for R?

---

<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:** [January 22, 2023, 2:09pm UTC](https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439/22 "2023-01-22T14:09:44Z")

</div>

> [@probit2011](#):
>
> > [@mkitti](#):
> >
> > Have you tried PythonCall.jl?
> 
> I could try, but the problem is that this was meant to work so that people can use the Julia for Data Science tutorial from Julia Academy. […] And it seems that using PyCall is the default way of installing these packages.

What are those packages, you use? ScikitLearn.jl is one of those (a wrapper package, requiring PyCall, for Python’s scikit-learn), the most important or only one?

You CAN use (all of) Python’s scikit-learn (with its Python API) from Julia with (see how to import there in the docs): [The Julia module PythonCall · PythonCall & juliacall](https://docs.juliahub.com/PythonCall/WdXsa/0.4.2/pythoncall/#Managing-Python-dependencies)

That’s probably not very useful to know, since code you use doesn’t use the Python API directly rather the Julia API, i.e. the wrapper ScikitLearn.jl. Of course PyCall (and it) should just work, but I checked if PythonCall support is on the radar, and I only found it mentioned in one unrelated comment: [https://github.com/search?q=repo%3Acstjean%2FScikitLearn.jl%20PythonCall&type=code](https://github.com/search?q=repo%3Acstjean%2FScikitLearn.jl%20PythonCall&type=code)

The rabbit hole is a bit deeper, you might be using (which also requires PyCall): [GitHub - JuliaAI/MLJScikitLearnInterface.jl: MLJ Interface for ScikitLearn.jl](https://github.com/JuliaAI/MLJScikitLearnInterface.jl)

Some wrapper packages have been migrating from PyCall, and I believe PythonCall.jl is the future. [You should be able to use PyCall and PythonCall together, e.g. if one of your (wrapper) packages uses one, and another the other.]

One important one to switch (keeping the name), also PyMNE.jl switched:

> **[GitHub - JuliaAI/CatBoost.jl: Julia wrapper of the python library CatBoost...](https://github.com/JuliaAI/CatBoost.jl)**
>
> Julia wrapper of the python library CatBoost for boosted decision trees - GitHub - JuliaAI/CatBoost.jl: Julia wrapper of the python library CatBoost for boosted decision trees

You can see PyCall has “334 Dependants”, so it’s hard to fully dislodge (vs “26 Dependants” for PythonCall):  
[https://juliahub.com/ui/Packages/PyCall/GkzkC/1.95.1?page=0](https://juliahub.com/ui/Packages/PyCall/GkzkC/1.95.1?page=0)

[Actually CatBoost is still listed as one, so it seems the dependents aren’t updated automatically, maybe on purpose, since for older versions, that you can still install, PyCall is used.]

E.g. PyPlot.jl uses PyCall.jl, but PythonPlot.jl, its replacement, uses PythonCall.jl. Note, I don’t think you can support both PyCall and PythonCall at the same time with some package (i.e. in same, or newest, version).

One package using PythonCall.jl with MLJ:

> **[GitHub - tylerjthomas9/RAPIDS.jl: An unofficial Julia wrapper for the...](https://github.com/tylerjthomas9/RAPIDS.jl)**
>
> An unofficial Julia wrapper for the RAPIDS.ai ecosystem using PythonCall.jl - GitHub - tylerjthomas9/RAPIDS.jl: An unofficial Julia wrapper for the RAPIDS.ai ecosystem using PythonCall.jl

One solution is if/when more of the Julia ecosystem uses Julia only packages, I’m sure the reliance on ScikitLearn.jl is getting less and less. E.g. people use DataFrames.jl rather than Pandas.jl (or PandasLite.jl both packages rely on PyCall.jl and are hopefully getting outdated to use, still PythonCall.jl has some pandas specific code if not).

It seems likely you might use MLJ.jl and then possible (or in other ways through workarounds): [GitHub - JuliaAI/MLJScikitLearnInterface.jl: MLJ Interface for ScikitLearn.jl](https://github.com/JuliaAI/MLJScikitLearnInterface.jl)

The notebook is `using DelimitedFiles` (and CSV), a package getting a bit outdated to use, or arguably CSV only is good enough. It also mentioned (as an alternative) the very outdated (as a Julia wrapper) `TensorFlow.jl`.

---

<div class="post-metadata">

**Author:** ![exchange12rocks](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/exchange12rocks/32/46624_2.png) [@exchange12rocks](https://discourse.julialang.org/u/exchange12rocks)\
**Post date:** [February 7, 2023, 2:16am UTC](https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439/23 "2023-02-07T02:16:50Z")

</div>

Fixed: [download installer to tempdir(), not installation dir by stevengj · Pull Request #231 · JuliaPy/Conda.jl · GitHub](https://github.com/JuliaPy/Conda.jl/pull/231)

[Previous page](https://discourse.julialang.org/t/unable-to-build-pycall-and-rcall/92439.md?page=1)
