I am trying to use the following script provided through GitHub: Script. I have python 3.9.10 installed, pip version 22.0.4. But when I run py script.py
I get the following error message: "ImportError: DLL load failed while importing _SimpleITK. Can't find the given module"
I first had a problem downloading SimpleITK because CMake could not build it, or recognise the building wheel. But now that seems to work fine and I've tried using different versions of SimpleITK (2.0.2 and 2.1.0) but both give me the same error.
I also made sure to remove any other versions of python since I did have 3.10 installed before but that didn't solve anything either.
I think I solved the problem, I am not sure which of the steps did it but this is what I did.
Added
c:\users\alexa\appdata\local\programs\python\python39\lib\site-packages
to Path in environment variables. This is most likely the root cause of the problem.(Re)Installed Visual Studio 2022.
Reinstalled SimpleITK, scikit-build, CMake and numpy in terminal with pip.