JuliaPy / JuliaPy/PythonCall.jl

Conflict between julia and python binaries/artifacts

Ouverte
#397 7 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
bug
Langage dominant
Julia
Étoiles
1.1k
Forks
86
Merge moyen
1 j 22 h
PR mergées (30 j)
3

Description

**Affects:** JuliaCall

**Describe the bug**
When using a conda/mamba environment and juliacall I encountered an issue when NetCDF files are read by the julia code. When trying to read the files the julia code would raise the following error and crash the kernel:
```sh
symbol lookup error: .../.julia/artifacts/*/lib/netcdf.so: undefined symbol: H5Pset_all_coll_metadata_ops
```

It turns out that this error only occured if python packages depending on netCDF were imported.

For example, the following code would crash:

```py
import esmpy
from juliacall import Main as jl

jl.seval("using NCDatasets")
ds = jl.Dataset("file.nc")
```

While this runs fine:
```py
from juliacall import Main as jl

jl.seval("using NCDatasets")
ds = jl.Dataset("file.nc")
```

**Workaround:**
I managed to avoid this crash by ensuring that the Julia and Python packages used the exact same version of the netcdf5 and hdf5 binaries, in which case things went fine.
However, this can be very challenging to do.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by reproducing the two Python examples involving esmpy, juliacall, NCDatasets, and file.nc, then compare the loaded netcdf and hdf5 binaries. Trace where the Julia and Python environments select conflicting artifacts. Done means the demonstrated import order no longer crashes with the undefined H5Pset_all_coll_metadata_ops symbol.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
julia, python
Domaine
backend
Type d'issue
Bug
Difficulté
4/5
Temps estimé
3-5 jours
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
35/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.