[ITK] [ITK-users] Installing ITK into Eclipse/PyDev

Matt McCormick matt.mccormick at kitware.com
Thu Aug 27 13:51:52 EDT 2015


Hi Barry,

ITK uses lazy loading of its modules so that 'import itk' does not
cause all of the modules to be loaded.  This improves start time, but
it may interfere with Eclipse/PyDev's inspection. Maybe if the IDE's
Python initialization code called something like:

def load_itk():
    try import itk:
        from itk import *
    except ImportError:
        pass

load_itk()

the references it is seeking will be found.

HTH,
Matt


On Thu, Aug 27, 2015 at 11:12 AM, Barry Hathaway <bhathaw1 at nycap.rr.com> wrote:
> I'm trying to get the ITK Python wrapping to work in my Eclipse/PyDev
> environment which
> references a Python virtual environment. I have copied WrapITK.pth into the
> virtual environment's
> Lib/site-packages and have verified that I can call various methods. The
> problem is that
> within the Eclipse editor all the ITK references appear in red as errors
> because it cannot
> find the methods.  Also the method hints/autocompletion does not work.  Any
> ideas?
> Thanks in advance.
>
> Barry Hathaway
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list