JuliaPy / JuliaPy/PyCall.jl

InitError: incompatible libpython detected right after rebuild

Aperta
#894 0 commenti 3 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Julia
Stelle
1.5k
Fork
186
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have set the following env variables
```
export PYCALL_JL_RUNTIME_PYTHON=$(which python)
export PYTHON=$(which python)
```
python is installed through Pyenv, and i use it through a virtual environment
```
Ricerca/Scratch/PyJl via ஃ v1.6.0 via python-3.9.4 via 🐍 3.9.4
➜ which python
~/Documents/pythonenvs/pyjl/python-3.9.4/bin/python
```
And If I launch Julia i get the error that i do not understand:

```julia
Dropbox/Ricerca/Scratch
➜ cd PyJl/
direnv: loading ~/Dropbox/Ricerca/Scratch/PyJl/.envrc
direnv: export +JULIA_PROJECT +PYCALL_JL_RUNTIME_PYTHON +PYENV_VERSION +PYTHON +VIRTUAL_ENV +direnv_layout_dir ~PATH

Ricerca/Scratch/PyJl via ஃ v1.6.0 via python-3.9.4 via 🐍 3.9.4
➜ julia --project=.
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.6.0 (2021-03-24)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |

(PyJl) pkg> build PyCall
Building Conda ─→ `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/6231e40619c15148bcb80aa19d731e629877d762/build.log`
Building PyCall → `~/.julia/scratchspaces/44cfe95a-1eb2-52ea-b672-e2afdf69b78f/169bb8ea6b1b143c5cf57df6d34d022a7b60c6db/build.log`
Progress [========================================>] 1/1
1 dependency successfully precompiled in 4 seconds (28 already precompiled)

julia> using PyCall
ERROR: InitError: Incompatible `libpython` detected.
`libpython` for /home/filippovicentini/Documents/pythonenvs/pyjl/python-3.9.4/bin/python is:
/home/filippovicentini/.pyenv/versions/3.9.4/lib/python3.9/config-3.9-x86_64-linux-gnu/libpython3.9.a
`libpython` for /home/filippovicentini/Documents/pythonenvs/pyjl/python-3.9.4/bin/python is:
/lib64/libpython3.9.so
PyCall.jl only supports loading Python environment using
the same `libpython`.

Stacktrace:
[1] error(s::String)
@ Base ./error.jl:33
[2] __init__()
@ PyCall ~/.julia/packages/PyCall/BD546/src/pyinit.jl:168
[3] _include_from_serialized(path::String, depmods::Vector{Any})
@ Base ./loading.jl:674
[4] _require_search_from_serialized(pkg::Base.PkgId, sourcepath::String)
@ Base ./loading.jl:760
[5] _require(pkg::Base.PkgId)
@ Base ./loading.jl:998
[6] require(uuidkey::Base.PkgId)
@ Base ./loading.jl:914
[7] require(into::Module, mod::Symbol)
@ Base ./loading.jl:901
during initialization of module PyCall
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with the PyCall initialization path at src/pyinit.jl:168 and reproduce the failure using the shown Julia project, Python virtual environment, and PYCALL_JL_RUNTIME_PYTHON settings. Compare the libpython paths reported during initialization with the PyCall build output in the referenced build logs. Done means PyCall initializes successfully with the selected Python environment.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
julia, python
Ambito
backend
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.