JuliaPy / PythonCall.jl

Python and Julia in harmony.
https://juliapy.github.io/PythonCall.jl/stable/
MIT License
776 stars 63 forks source link

Python crashes when loading Julia module #350

Closed EmanuelCastanho closed 1 year ago

EmanuelCastanho commented 1 year ago

I installed JuliaCall on my Conda environment using pip install juliacall. I am trying to run a module created by my colleague in Julia that has important functions that I need to use on my Python code. The module uses Flux, BSON and Glob packages.

However, this is giving me a segmentation fault.

When I run only the following lines of code, it gives me Load Errors.

from juliacall import Main as jl
jl.include("modules/Classification.jl")
ERROR: LoadError: Artifact "OpenSpecFun" was not found by looking in the paths:
  ~/.julia/artifacts/083301655942999198605bee77f89f1d41bf820e
  ~/.julia/juliaup/julia-1.9.2+0.x64.apple.darwin14/local/share/julia/artifacts/083301655942999198605bee77f89f1d41bf820e
  ~/.julia/juliaup/julia-1.9.2+0.x64.apple.darwin14/share/julia/artifacts/083301655942999198605bee77f89f1d41bf820e
Try `using Pkg; Pkg.instantiate()` to re-install all missing resources if the artifact is part of a package

I think it is related with some confusion using the correct Julia version, I use juliaup to control my versions. Any idea how to solve this? I am using macOS and Python3.9.

EmanuelCastanho commented 1 year ago

Solved: I changed my juliaup default version and installed the packages Flux, BSON and Glob inside the julia_env of the Conda environment.