[Python] Jupyter breaks most recent Mayavi 4.8.3

Discussão em 'Python' iniciado por Stack, Julho 6, 2025.

  1. Stack

    Stack Membro Participativo

    For me, Jupyter(-lab) fails to work with the most recent version of Mayavi 4.8.3.
    Other Python interpreter software (like Spyder, ipython, ...) works well.
    For me, this can be boiled down to a bare-bones-test-environment, as described next.

    1) Create fresh test environment ~> conda create --name tes (This runs on Python 3.13.5 for me, but the issue persists for other versions of Python.) Activate ~> conda activate tes. Then

    conda install jupyter
    conda install mayavi
    conda install ipyevents
    conda install itkwidgets
    conda install mesalib
    conda install puremagic


    will install a bunch of dependencies.

    2) In test environment, open (tes)~> jupyter-lab. Then do

    [1]: from mayavi import mlab
    mlab.init_notebook()
    Output is: Notebook initialized with ipy backend.

    [2]: mlab.figure()


    The expected output is a Mayavi figure canvas window.
    Instead: The jupyter-lab kernel dies and restarts with no indication why.

    3) For sanity, open another interpreter in the same environment, e.g., ipython by, e.g., (tes)~> terminator --command="ipython --pylab". Then do

    In [1]: from mayavi import mlab
    In [2]: mlab.figure()


    This generates a Mayavi canvas window as expected. Same for Spyder.

    Conclusion: Jupyter breaks the most recent Mayavi 4.8.3
    Any suggestions what is wrong?

    Continue reading...

Compartilhe esta Página