AttributeError: module 'itk.ITKClassifiersPython' has no attribute 'swig'

Hello,

I recently updated my ITK to ITK 5.1.0 release with Anaconda and i wanted to do some tests with codes that i’ve already had and were working. The code i’m using is basically doing a segmentation with different filters and when the itk.ScalarImageKmeansImageFilter was executed, i was getting this error:

`ModuleNotFoundError: No module named '_itkImageToImageFilterBPython'`

Now i’m getting this one:

 'AttributeError: module 'itk.ITKClassifiersPython' has no attribute 'swig''

Is there something i can do to solve this issue with the new release ?
obs: I’m using python 3.7.6 on Windows

Thanks!

Hello Lucca,

Does the error persist with a clean conda environment?

Is there a self-contained script that can be used to reproduce the error?

Thanks,
Matt

Hi Matt,

With a clean conda environment everything worked well. I’ve tried to “update” the itk-segmentation package with pip install in the environment that i work and now everything works fine too. I don’t know what actually happened but now it’s working :sweat_smile:.

Thanks very much for the quick answer!

Lucca

1 Like