PyCall.jl
PyCall.jl copied to clipboard
InitError: incompatible libpython detected right after rebuild
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:
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