[ITK] Fwd: ITK and python wrap problem

Michka Popoff michkapopoff at gmail.com
Fri Aug 22 11:30:00 EDT 2014


Please keep the discussion on the mailing list :)

Okay, so you will have to find the paths to the right folders/files to be consistent in your python choice.
I would be happy if you could communicate me the paths for Ubuntu 12.04, so I could extend the installation procedure.

Seems on ubuntu the procedure is the same for loading the shared libraries:
http://unix.stackexchange.com/questions/67781/use-shared-libraries-in-usr-local-lib
On Ubuntu you should have a /etc/ld.so.conf file. Then you should run ldconfig.

Michka

On 22 août 2014, at 17:21, gowith king <gowithking at googlemail.com> wrote:

> Dear Popoff 
>      I am using Ubuntu 12.04 LTS. the warning is the mismatching of python library and python executable : python executable "2.7.3" and library "" is mismatched. Here is the option setting:
> 
> 
> PYTHON_EXECUTABLE                /usr/bin/python                              
>  PYTHON_INCLUDE_DIR               /usr/include/python2.7                       
>  PYTHON_LIBRARY                   /usr/lib/libpython2.7.so                     
>  PY_SITE_PACKAGES_PATH            /usr/lib/python2.7/dist-packages          
> 
> The libitkvnl_algo-4.7.so file exist in /usr/local/lib . 
> 
> I do have few python versions been installed in the same OS. 
> The flags in the instruction of  'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' are not exact as the same as the description. I will try your instruction step be step in my system. 
> By the way, your instruction is so practical.
> 
> Have a nice day. 
> 
>   
> 
> 
> 
> On Fri, Aug 22, 2014 at 4:15 PM, Michka Popoff <michkapopoff at gmail.com> wrote:
> Hi
> 
> Some important questions first:
> 
> What was the warning for the library mismatch ?
> On what OS are you installing ?
> Is the libitkvnl_algo-4.7.so file present in /usr/local/lib ?
> 
> If the warnings were about the python library, it is quite important.
> It may happen that you have two different python installations, and cmake is not able to find the right libraries.
> 
> I wrote some instructions to install ITK with python wrapping on Fedora http://www.itk.org/Wiki/ITK/WrapITKInstallFedora
> There is a list of cmake flags you can set to help cmake find the right python, if it’s the problem you had.
> I think the error is just because the library is not in your path. If you are using Fedora, just follow the instructions I wrote down.
> For other OS’es there are ways to do this, like setting the LD_LIBRARY_PATH for example (you'll have to google this)
> 
> Feedback is welcome so I can improve the installation instructions :)
> 
> Michka
> 
> On 22 août 2014, at 16:06, gowith king <gowithking at googlemail.com> wrote:
> 
>> 
>> 
>> ---------- Forwarded message ----------
>> From: gowith king <gowithking at googlemail.com>
>> Date: Fri, Aug 22, 2014 at 1:32 PM
>> Subject: ITK and python wrap problem
>> To: community at itk.org
>> 
>> 
>> Dear ITK friends
>>       I am not sure this is an appropriate place to issue my problem in the wrapping  process:
>>       I followed the instruction of 'http://www.itk.org/Wiki/ITK_Release_4/Wrapping/WrapITK_Installation' to finish the compiling and installing process. it look good so far except a warning of mismatching library version, I think it could be ignored. 
>>       Then I tried one line for test :
>> >>> import itk 
>> >>> inputimage=itk.Image[itk.UC,3]
>> Traceback (most recent call last):
>>   File "<stdin>", line 1, in <module>
>>   File "/usr/local/lib/ITK-4.7/Python/itkLazy.py", line 42, in __getattribute__
>>     itkBase.LoadModule(module, namespace)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>>     LoadModule(dep, namespace)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>>     LoadModule(dep, namespace)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>>     LoadModule(dep, namespace)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 108, in LoadModule
>>     LoadModule(dep, namespace)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 118, in LoadModule
>>     module = loader.load(swigModuleName)
>>   File "/usr/local/lib/ITK-4.7/Python/itkBase.py", line 224, in load
>>     return imp.load_module(name, fp, pathname, description)
>>   File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 32, in <module>
>>     _ITKCommonPython = swig_import_helper()
>>   File "/usr/local/lib/ITK-4.7/Python/ITKCommonPython.py", line 28, in swig_import_helper
>>     _mod = imp.load_module('_ITKCommonPython', fp, pathname, description)
>> ImportError: libitkvnl_algo-4.7.so.1: cannot open shared object file: No such file or directory
>> 
>> I got totally lost for this, what should I do to fix this?
>> Any suggestion would be appreciated
>> 
>>        
>>     
>> 
>> _______________________________________________
>> Community mailing list
>> Community at itk.org
>> http://public.kitware.com/mailman/listinfo/community
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140822/bab861f7/attachment-0002.html>


More information about the Community mailing list