<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Thank you Michka! The solution was in the ldconfig file creation:<div><br></div><div><blockquote type="cite"><div style="margin: 0.4em 0px 0.5em; line-height: 19.049999237060547px; font-family: sans-serif; font-size: 13px;">ITK will install by default in /usr/local/lib. Now, you have to tell the system that the files have been installed here.</div><ul style="line-height: 19.049999237060547px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url(http://www.itk.org/Wiki/skins/monobook/bullet.gif); font-family: sans-serif; font-size: 13px;"><li style="margin-bottom: 0.1em;">cd /etc/ld.so.conf.d/</li><li style="margin-bottom: 0.1em;">add a file called itk-46.conf, which should contain only one line: /usr/local/lib</li><li style="margin-bottom: 0.1em;">ldconfig # tells the system to read the files in ld.so.conf.d</li></ul></blockquote><div><br></div>On Ubuntu 14 the Python directory configuration is a bit different than in the Fedora guide:</div><div><br></div><div><blockquote type="cite">/Path to a program.<br>PYTHON_EXECUTABLE:FILEPATH=/usr/bin/python<br><br>//Path to a file.<br>PYTHON_INCLUDE_DIR:PATH=/usr/include/python2.7<br><br>//Path to a file.<br>PYTHON_INCLUDE_DIR2:PATH=/usr/include/x86_64-linux-gnu/python2.7<br><br>//Path to a library.<br>PYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython2.7.so.1.0<br><br>//Path to a library.<br>PYTHON_LIBRARY_DEBUG:FILEPATH=PYTHON_LIBRARY_DEBUG-NOTFOUND<br><br>//Directory where the arrayobject.h header file can be found. This<br>// file is part of the numarray package<br>PYTHON_NUMARRAY_INCLUDE_DIR:PATH=/usr/lib/python2.7/dist-packages/numpy/core/include/numpy<br><br>//Python site-packages directory to install a .pth file pointing<br>// at WrapITK Python modules.<br>PY_SITE_PACKAGES_PATH:PATH=/usr/lib/python2.7/dist-packages</blockquote></div><div><br></div><div>Best,</div><div><br></div><div>Sami</div><div>
<br><div><div>On Sep 30, 2014, at 14:03, Michka Popoff <<a href="mailto:michkapopoff@gmail.com">michkapopoff@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi<br><br>once ITK is compiled, there is no more need for Swig at runtime.<br><br>For the syntax, you should use the new wrapping syntax.<br>Look at how it is done in this example, at the end there is python code [1]<br><br>I would recommend you not to use system swig, this is mostly an option for people wanting to play around with external versions of swig.<br>If you want to be sure it works, just set ITK_USE_SYSTEM_SWIG=OFF. ITK will download, compile and use an internal swig.<br>You can find a detailed tutorial for the installation here : <a href="http://www.itk.org/Wiki/ITK/WrapITKInstallFedora">http://www.itk.org/Wiki/ITK/WrapITKInstallFedora</a><br><br>The tutorial should work for Ubuntu 14, I never tried but one user reported being able to install ITK wrappings with this tutorial.<br><br>[1] <a href="http://itk.org/ITKExamples/src/Filtering/AnisotropicSmoothing/ComputeCurvatureAnisotropicDiffusion/Documentation.html">http://itk.org/ITKExamples/src/Filtering/AnisotropicSmoothing/ComputeCurvatureAnisotropicDiffusion/Documentation.html</a><br><br>Michka<br><br>On 30 sept. 2014, at 12:51, Sami Koho <<a href="mailto:sakoho@utu.fi">sakoho@utu.fi</a>> wrote:<br><br><blockquote type="cite">Hello,<br><br>this week I tried to upgrade my ITK installation on my Ubuntu 14.04 (64 bit) to the 4.6.0 release version, as it promised much improved Python wrapping. I had previously been using some pre-4.6 build from GIT. The library compiles fine, but now the Python wrapping does not work on my computer.<br><br>I am able to load itk in Python, but every time I try to execute anything, the following error appears:<br><br><blockquote type="cite"><ipython-input-12-8e289c4078ab> in <module>()<br>----> 1 reader = itk.ImageFileReader.IUC3.New()<br><br>/usr/local/lib/ITK-4.6/Python/itkLazy.py in __getattribute__(self, attr)<br> 40 module = self.__lazy_attributes[attr]<br> 41 namespace = {}<br>---> 42 itkBase.LoadModule(module, namespace)<br> 43 # Load into 'namespace' first, then self.__dict__ (via setattr) to<br> 44 # prevent the warnings about overwriting the 'NotLoaded' values<br><br>/usr/local/lib/ITK-4.6/Python/itkBase.py in LoadModule(name, namespace)<br> 51 if namespace is not None:<br> 52 swig = namespace.setdefault('swig', imp.new_module('swig'))<br>---> 53 swig.__dict__.update(this_module.swig.__dict__)<br> 54<br> 55 # don't worry about overwriting the symbols in namespace -- any<br><br>AttributeError: 'module' object has no attribute 'swig'<br></blockquote><br>I have had this problem before, but previously on Ubuntu I solved it by selecting USE SYSTEM SWIG in CMAKE before compiling. Now, as the version 4.6.0 requires a newer version of swig, this does not work. As a further detail, if I try to manually insert a command, for example in iPython, tab-completion works until the module names e.g. itk.ImageFileReader, but then stops. It seems that the swig can not be found or is not working properly.<br><br>Should I manually set a path to swig? Or is something else wrong instead?<br><br>I have installed ITK in the default path /usr/local/lib, as can be seen from the example.<br><br>Best,<br><br>Sami<br></blockquote><br>_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>