[Insight-users] WrapITK instal troubles
Zachary Pincus
zpincus at stanford.edu
Thu Mar 30 13:43:46 EST 2006
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.
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
More information about the Insight-users
mailing list