[Gmsh] ImportError when import of gmshpy

w.hortschitz at gmail.com w.hortschitz at gmail.com
Mon Jan 13 16:09:57 CET 2014


Hi,

Jonathan wrote me regarding the ImportError: 

"I would say that you have to add the directory
gmsh-2.8.4-dynamic-svn-Linux/lib in your LD_LIBRARY_PATH
or copy its content e.g. in /usr/local/lib "

This is done with e.g.(non persistant):
export 
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/caelinux/Downloads/gmsh-2.8.4-dynamic-svn-Linux/lib


Regards,
Wilfried


Am Donnerstag, 26. Dezember 2013 14:09:25 UTC+1 schrieb Wilfried Hortschitz:
>
> Hallo,
>
> I try to install gmsh with its python libraries (gmshpy). I want to use 
> python to mesh and extrude an existing 2D geometry (set of polylines) which 
> was generated with the python library shapely (
> https://pypi.python.org/pypi/Shapely).
>
> Therefore, I downloaded the package gmsh-svn-Linux64-dynamic.tgz from 
> http://geuz.org/gmsh/bin/Linux/ .
>
> After extraction I run the setup script 'sudo python setup.py install' in 
> the 'gmshpy' sub-folder which finishes without errors (see also 
> http://geuz.org/pipermail/gmsh/2013/008407.html).
>
> Thereafter, the following path was exported as described here (
> http://www.geuz.org/pipermail/gmsh/2013/007782.html): 
>
>     caelinux at caelinux:~$ export LD_PRELOAD=/usr/lib/libmpi.so
>
> This procedure was tested on my local system ubuntu 12.04 x 64 with 2.7.3 
> and the current image of CAELinux (
> http://sourceforge.net/projects/caelinux/files/CAELinux2013/) 
> caelinux2013-beta1.iso (tested as live-cd with virtualbox).
>
> Unfortunately, I ended with the following error when importing gmshpy.
>
> When I start a ipython console and type:
>
> #############################################################
>     In [1]: import gmshpy
>
> I get the following error message:
>
> ---------------------------------------------------------------------------
>
> ImportError                               Traceback (most recent call last)
>
> /home/caelinux/<ipython-input-1-f54c00cac136> in <module>()
>
> ----> 1 import gmshpy
>
> /usr/local/lib/python2.7/dist-packages/gmshpy/__init__.py in <module>()
>       3 signal.signal(signal.SIGINT, signal.SIG_DFL)
>       4 
> ----> 5 from gmshpy.gmshCommon import *
>       6 from gmshpy.gmshGeo import *
>       7 from gmshpy.gmshNumeric import *
>
> /usr/local/lib/python2.7/dist-packages/gmshpy/gmshCommon.py in <module>()
>      24                 fp.close()
>      25             return _mod
> ---> 26     _gmshCommon = swig_import_helper()
>      27     del swig_import_helper
>      28 else:
>
> /usr/local/lib/python2.7/dist-packages/gmshpy/gmshCommon.py in 
> swig_import_helper()
>      20         if fp is not None:
>      21             try:
> ---> 22                 _mod = imp.load_module('_gmshCommon', fp, 
> pathname, description)
>      23             finally:
>      24                 fp.close()
>
> ImportError: libGmsh.so.2.8: cannot open shared object file: No such file 
> or directory
>
> #############################################################
>
> Do you have any suggestions what went wrong? Do I have to link libGmsh?
> Maybe you can test the package with the same live cd image 
> (caelinux2013-beta1.iso) or try to get in contact with the developer so 
> that inexperienced users could simply use the cd-image.
>
> Thanks in advance,
> Wilfried
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20140113/e23fd9dc/attachment.html>