[Gmsh] Gmsh Pyhon API + matplotlib cause unreadable msh files and Segmentation fault
cgeuzaine at uliege.be
cgeuzaine at uliege.be
Fri Oct 25 13:33:46 CEST 2019
Can you try a recent snapshot of the SDK and let us know if it fixes the issue (which IIRC was due to statically linking the standard C++ lib)?
Thanks,
Christophe
> Le 25 oct. 2019 à 12:30, Baptiste DURAND <baptiste.durand at enpc.fr> a écrit :
>
>
> Dear all,
>
> I'm used to using gmsh through the python API, on Ubuntu 18.04.
> With the version 4.4 of gmsh, I am faced with an unwanted behaviour when I try to import both gmsh and matplotlib into the same script.
>
> Firstly, if matplotlib is imported before gmsh, a Segmentation fault error occurs.
> Steps to reproduce this :
> Create a new virtual environment :
> Activate this environment :
> Install wheels : pip3 install wheels
> Install gmsh python API using the gmsh-sdk package on pypi.org : pip3 install gmsh-sdk
> Install the matplotlib package : pip3 install matplotlib
> Add the line "import matplotlib" before "import gmsh" in the demo script t1.py
> Run this demo script in the virtual environment : python3 t1.py
> This results in : Segmentation fault (core dumped)
> If matplotlib is not imported or is imported after gmsh this segmentation fault doesn't occur.
>
>
> In addition, if include-system-site-packages is set to true in the configuration file of the virtual environment (pyvenv.cfg) another problem appears.
> I need this setting because I would like to use the FEniCS finite element code and it cannot be installed inside a virtual environment.
> Even if matplotlib is imported after gmsh, the resulting mesh file is unreadable because the decimal separator is a comma.
>
>
> Has anyone faced a similar issue ?
>
>
> Best regards,
>
> Baptiste Durand
>
> ---
> Baptiste Durand
> Doctorant – Laboratoire Navier
> baptiste.durand at enpc.fr – 01 64 15 37 21 (06 58 88 05 41) – linkedin.com/in/baptistedurand
> <t1_with_matplotlib.py>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20191025/24a2795d/attachment.html>
More information about the gmsh
mailing list