JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
478 stars 88 forks source link

PyPlot cannot be used on Julia 1.7.2 #546

Open kzapfe opened 2 years ago

kzapfe commented 2 years ago

I have just updated/upgraded my whole system and now I have Julia 1.7.2 I have updated the packages of Julia and they seem to be downloaded fine, and there are no complaints after using the add PyPlot on the Pkg interface. But If I try:

using PyPlot

I get the following error:

using PyPlot, DelimitedFiles, JLD

┌ Info: Precompiling PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]
└ @ Base loading.jl:1423

signal (6): Abortado
in expression starting at /home/karel/.julia/packages/PyPlot/XaELc/src/PyPlot.jl:4

And then the usual gibberish ending with:

Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to /home/karel/.julia/compiled/v1.7/PyPlot/jl_eGwi3X.
jishnub commented 2 years ago

Could you post the full error message? I can't reproduce this in a fresh environment.

julia> VERSION
v"1.7.2"

(@v1.7) pkg> activate --temp
add Py  Activating new project at `/tmp/jl_Necwjf`

(jl_Necwjf) pkg> add PyPlot
    Updating registry at `~/.julia/registries/General.toml`
   Resolving package versions...
    Updating `/tmp/jl_Necwjf/Project.toml`
  [d330b81b] + PyPlot v2.10.0
    Updating `/tmp/jl_Necwjf/Manifest.toml`
  [3da002f7] + ColorTypes v0.11.0
  [5ae59095] + Colors v0.12.8
  [8f4d0f93] + Conda v1.7.0
  [53c48c17] + FixedPointNumbers v0.8.4
  [682c06a0] + JSON v0.21.3
  [b964fa9f] + LaTeXStrings v1.3.0
  [1914dd2f] + MacroTools v0.5.9
  [69de0a69] + Parsers v2.2.2
  [438e738f] + PyCall v1.93.1
  [d330b81b] + PyPlot v2.10.0
  [189a3867] + Reexport v1.2.2
  [81def892] + VersionParsing v1.3.0
  [0dad84c5] + ArgTools
  [56f22d72] + Artifacts
  [2a0f44e3] + Base64
  [ade2ca70] + Dates
  [f43a241f] + Downloads
  [b77e0a4c] + InteractiveUtils
  [b27032c2] + LibCURL
  [8f399da3] + Libdl
  [37e2e46d] + LinearAlgebra
  [56ddb016] + Logging
  [d6f4376e] + Markdown
  [a63ad114] + Mmap
  [ca575930] + NetworkOptions
  [de0858da] + Printf
  [9a3f8284] + Random
  [ea8e919c] + SHA
  [9e88b42a] + Serialization
  [6462fe0b] + Sockets
  [2f01184e] + SparseArrays
  [10745b16] + Statistics
  [8dfed614] + Test
  [4ec0a83e] + Unicode
  [e66e0078] + CompilerSupportLibraries_jll
  [deac9b47] + LibCURL_jll
  [29816b5a] + LibSSH2_jll
  [c8ffd9c3] + MbedTLS_jll
  [14a3606d] + MozillaCACerts_jll
  [4536629a] + OpenBLAS_jll
  [83775a58] + Zlib_jll
  [8e850b90] + libblastrampoline_jll
  [8e850ede] + nghttp2_jll

julia> using PyPlot

julia> plot(1:4)
1-element Vector{PyCall.PyObject}:
 PyObject <matplotlib.lines.Line2D object at 0x7f2ab67145e0>
kzapfe commented 2 years ago

Sorry about the delay: Here is the full error.

julia> import Pkg

julia> Pkg.precompile()
Precompiling project...
  ✗ PyPlot
  0 dependencies successfully precompiled in 3 seconds (144 already precompiled)

ERROR: The following 1 direct dependency failed to precompile:

PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee]

Failed to precompile PyPlot [d330b81b-6aea-500a-939a-2ce795aea3ee] to /home/karel/.julia/compiled/v1.7/PyPlot/jl_L5bARr.

signal (6): Abortado
in expression starting at /home/karel/.julia/packages/PyPlot/XaELc/src/PyPlot.jl:4
__pthread_kill_implementation at /usr/bin/../lib/libc.so.6 (unknown line)
raise at /usr/bin/../lib/libc.so.6 (unknown line)
abort at /usr/bin/../lib/libc.so.6 (unknown line)
unknown function (ip: 0x7efe1e3c7061)
CThunkObject_dealloc at /usr/local/src/conda/python-3.7.4/Modules/_ctypes/callbacks.c:21
free_keys_object.lto_priv.1779 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
dict_dealloc.lto_priv.384 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyCData_clear at /usr/local/src/conda/python-3.7.4/Modules/_ctypes/_ctypes.c:2583 [inlined]
PyCFuncPtr_clear at /usr/local/src/conda/python-3.7.4/Modules/_ctypes/_ctypes.c:4031 [inlined]
PyCFuncPtr_dealloc at /usr/local/src/conda/python-3.7.4/Modules/_ctypes/_ctypes.c:4037
subtype_dealloc.lto_priv.1755 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
function_code_fastcall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
call_function.lto_priv.1537 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalCodeWithName at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyEval_EvalCodeEx at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyEval_EvalCode at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
builtin_exec at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyMethodDef_RawFastCallDict at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyCFunction_FastCallDict at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalCodeWithName at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyFunction_FastCallKeywords at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
call_function.lto_priv.1537 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
function_code_fastcall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
call_function.lto_priv.1537 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
function_code_fastcall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
call_function.lto_priv.1537 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
function_code_fastcall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
call_function.lto_priv.1537 at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyEval_EvalFrameDefault at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
function_code_fastcall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyFunction_FastCallDict at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
object_vacall at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyObject_CallMethodIdObjArgs at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyImport_ImportModuleLevelObject at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
builtin___import__ at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyMethodDef_RawFastCallDict at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_PyCFunction_FastCallDict at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyObject_CallFunction at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyImport_Import at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
PyImport_ImportModule at /home/karel/.julia/conda/3/lib/libpython3.7m.so.1.0 (unknown line)
_pyimport at /home/karel/.julia/packages/PyCall/7a7w0/src/PyCall.jl:475
pyimport at /home/karel/.julia/packages/PyCall/7a7w0/src/PyCall.jl:499
__init__ at /home/karel/.julia/packages/PyCall/7a7w0/src/pyinit.jl:221
unknown function (ip: 0x7efe0c91a593)
unknown function (ip: 0x7efe251aee86)
jl_init_restored_modules at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7efe0dc48ecf)
unknown function (ip: 0x7efe0dd8d867)
unknown function (ip: 0x7efe0dd0a64d)
unknown function (ip: 0x7efe0de14465)
unknown function (ip: 0x7efe0de14eee)
unknown function (ip: 0x7efe251ae8b0)
unknown function (ip: 0x7efe251b08f2)
unknown function (ip: 0x7efe251b00fa)
unknown function (ip: 0x7efe251b0476)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7efe0dd96857)
unknown function (ip: 0x7efe0dd82fe1)
unknown function (ip: 0x7efe0dd0f59e)
unknown function (ip: 0x7efe0dd0f889)
unknown function (ip: 0x7efe2519172c)
unknown function (ip: 0x7efe25190ff4)
unknown function (ip: 0x7efe25191e44)
unknown function (ip: 0x7efe25192c53)
unknown function (ip: 0x7efe251af84f)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7efe0d7fd647)
unknown function (ip: 0x7efe2519172c)
unknown function (ip: 0x7efe25190ff4)
unknown function (ip: 0x7efe25191e44)
unknown function (ip: 0x7efe25192c53)
unknown function (ip: 0x7efe251af84f)
unknown function (ip: 0x7efe251b0476)
jl_toplevel_eval_in at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
unknown function (ip: 0x7efe0deac30d)
unknown function (ip: 0x7efe0d90e152)
unknown function (ip: 0x7efe0d90e2a8)
unknown function (ip: 0x7efe251d72d2)
jl_repl_entrypoint at /usr/bin/../lib/julia/libjulia-internal.so.1 (unknown line)
main at /usr/bin/julia (unknown line)
__libc_start_call_main at /usr/bin/../lib/libc.so.6 (unknown line)
__libc_start_main at /usr/bin/../lib/libc.so.6 (unknown line)
_start at /usr/bin/julia (unknown line)
Allocations: 2721 (Pool: 2712; Big: 9); GC: 0
Stacktrace:
 [1] top-level scope
stevengj commented 2 years ago

Was there an error or warning when you built PyCall?

It works fine for me… maybe it is a problem with your Python installation?