[Insight-users] WrapITK instal troubles

Gaetan Lehmann gaetan.lehmann at jouy.inra.fr
Thu Mar 30 14:11:48 EST 2006


On Thursday 30 March 2006 20:43, Zachary Pincus wrote:
> Hi Vincent -
>
> >    import _VXLNumericsPython
> > ImportError: libitkvnl.so: cannot open shared object file: No such
> > file or directory
> > --------------------------------------------------
> >
> > I can find libitkvnl.so in
> > /usr/local/lib/InsightToolkit/libitkvnl.so
> >
> > I played a little with some environnement variable
> > so that now I have
> > PYTHONPATH=/usr/local/lib/InsightToolkit/python/:/usr/local/lib/
> > InsightToolkit/
> > LD_LIBRARY_PATH=/usr/local/lib/InsightToolkit/WrapITK/Python-SWIG
> >
> > Someone (Gaetan ) ?
>
> /usr/local/lib/InsightToolkit needs to be on the LD_LIBRARY_PATH, not
> the PYTHONPATH.

I only want to add that on linux (at least mandriva linux), you can add a file 
in /etc/ld.so.conf.d/ which contains the path to the lib directory, so you 
don't have to set the LD_LIBRARY_PATH var.
I have a file /etc/ld.so.conf.d/itk.conf which contains 
"/usr/lib/InsightToolkit" and a file /etc/ld.so.conf.d/python-itk.conf which 
contains "/usr/lib/InsightToolkit/WrapITK/Python-SWIG".

Gaetan

> The files in that directory are the ITK libraries that the loader
> needs to find, not Python extensions. Since ITK doesn't put them in a
> "normal" place (e.g. /usr/local/lib), you need to explicitly tell the
> loader where to find them.
>
>   Also, the first part of the PYTHONPATH should point to:
> /usr/local/lib/InsightToolkit/WrapITK/Python/
> not
> /usr/local/lib/InsightToolkit/python/
> The former is the WrapITK directory, and the latter is the python
> directory for the old ITK wrappers.
>
> However, if you did not disable the "Install WrapITK Compatibility"
> option in cmake (or if you ran that install target manually), a file
> called 'WrapITK.pth' was installed in the site-packages directory of
> your python installation. This file tells Python to add the WrapITK
> Python directory to the python path automatically. So in reality, you
> shouldn't need to set PYTHONPATH at all.
>
> I think all of this information should have been in the documentation
> (and the InsightJournal article) -- if we missed one of these steps
> in the docs, please let me know so that we can fix that.
>
> Zach Pincus
>
> > Sincerely,
> >    Vincent Pagé.
> >
> >
> >
> >
> > _______________________________________________
> > Insight-users mailing list
> > Insight-users at itk.org
> > http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://public.kitware.com/pipermail/insight-users/attachments/20060330/825171df/attachment.pgp


More information about the Insight-users mailing list