[Insight-users] making wrap_itk work in a restricted environment

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Thu May 17 12:02:12 EDT 2007


Hi,

Le 17 mai 07 à 16:04, ANIRUDH VIJ a écrit :

>
> hi,
> I am in an environment where i only have access to my home folder.
> I compiled itk and the Wrap_ITK python wrappers.But i cannot do a  
> 'make
> install' in /usr/local.

you should be able to install it in your home dir, by setting  
CMAKE_INSTALL_PREFIX to a path in your home dir with ccmake.

> itk is compiled in /home/work/itk_build.The .pth file also can't be  
> placed in
> /usr/lib/python because of restricted user rights.
> I can do a 'import itk' correctly on starting ipython from
> '/home/work/itk_build/Wrapping/Wrap_ITK'.

You should rather set the PYTHONPATH to the right path. Once  
installed, there in only one path to set.
If you want to use it in the build tree, there are 2 paths to set  
(search in the list archives if you want to go that way)

Both LD_LIBRARY_PATH and PYTHONPATH can be set in your ~/.bashrc, for  
example.

Gaëtan


> But initially itk could'nt find libSwigRuntime.so which existed in
> 'itk_build/bin' .So i did a 'export
> LD_LIBRARY_PATH=/home/work/itk_build/bin/'.But 'ldconfig' does'nt  
> work because
> it needs write permissions to /etc.
> Now,on instantiating anything in itk,i get this error:
>
> /home/work/itk_build/Wrapping/WrapITK/Python/<console>
>
> /home/work/itk_build/Wrapping/WrapITK/Python/itkLazy.py in
> __getattribute__(self, attr)
>      16       module = self.__lazy_attributes[attr]
>      17       namespace = {}
> ---> 18       itkBase.LoadModule(module, namespace)
>      19       # Load into 'namespace' first, then self.__dict__  
> (via setattr) to
>      20       # prevent the warnings about overwriting the  
> 'NotLoaded' values
> already
>
> /home/work/itk_build/Wrapping/WrapITK/Python/itkBase.py in  
> LoadModule(name,
> namespace)
>      22     if namespace is not None:
>      23         swig = namespace.setdefault('swig', imp.new_module 
> ('swig'))
> ---> 24         swig.__dict__.update(this_module.swig.__dict__)
>      25
>      26         # don't worry about overwriting the symbols in  
> namespace --
> any common
>
> AttributeError: 'module' object has no attribute 'swig'
>
> How could this be resolved,if a 'make install' is not possible?
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users

--
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr



-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: =?ISO-8859-1?Q?Ceci_est_une_signature_=E9lectronique_PGP?=
Url : http://public.kitware.com/pipermail/insight-users/attachments/20070517/cc703e33/PGP.pgp


More information about the Insight-users mailing list