SimpleElastix icon indicating copy to clipboard operation
SimpleElastix copied to clipboard

`No module named '_SimpleITK'` after installing SimpleElastix

Open fleurgaudfernau opened this issue 4 years ago • 4 comments

Dear all,

This issue seems to be pretty common, but so far I couldn't find a solution that worked for me...

I've tried to install SimpleElastix on Linux as specified in here: https://simpleelastix.readthedocs.io/GettingStarted.html I activated my python environment then installed SimpleElastix using python Packaging/setup.py install

After installation, when calling sitk.ElastixImageFilter(), the following error appeared: Module 'SimpleITK' has no attribute 'ElastixImageFilter'. I read in other issues that this might be due to several versions of SimpleITK coexisting on my computer, so I uninstalled SimpleITK and reinstalled SimpleElastix to ensure there was only one version of SimpleITK on my machine.

Now, when I try to import SimpleITK, python doesn't seem to find it: No module named '_SimpleITK'

I use python 3.6.

Thanks in advance!

fleurgaudfernau avatar Apr 02 '21 13:04 fleurgaudfernau

is there any solution to this issue? Thanks

numancelik34 avatar Nov 03 '21 22:11 numancelik34

Hello both! I had the same problem and found where the issue was for me:

Instead of calling python Packaging/setup.py install , I used the full path to the python environment I wanted it to be installed in, in my case miniconda3/envs/myenv/bin/python Packaging/setup.py install .

Hope it works for you too!

Dauriel avatar Jan 17 '22 12:01 Dauriel

I am also having this issue and would love for someone to take another look at this. Thanks!

annafoster318 avatar Jun 07 '22 20:06 annafoster318

I am also having this issue and would love for someone to take another look at this. Thanks!

Hi @annafoster318 , I did manage to make it work couple months ago. Did you try what I suggested?

Dauriel avatar Jun 07 '22 21:06 Dauriel