Hi everyone,
I would like to work with SimpleITK in Python. It seems that it has been installed successfully via miniconda on my Win11-x64 system, but when I try to import it in the interactive environment of Python, I encounter the following error:
Python 3.11.5 | packaged by Anaconda, Inc. | (main, Sep 11 2023, 13:26:23) [MSC v.1916 64 bit (AMD64)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
import SimpleITK
Traceback (most recent call last):
File “”, line 1, in
File “C:\ProgramData\miniconda3\envs\mytorch\Lib\site-packages\SimpleITK_init_.py”, line 18, in
from SimpleITK.SimpleITK import *
File “C:\ProgramData\miniconda3\envs\mytorch\Lib\site-packages\SimpleITK\SimpleITK.py”, line 13, in
from . import _SimpleITK
ImportError: DLL load failed while importing _SimpleITK: The specified module could not be found.
By the way, this is the list of packages installed in my miniconda environment:
packages in environment at C:\ProgramData\miniconda3\envs\mytorch:
Name Version Build Channel
abseil-cpp 20230802.0 h5da7b33_2
absl-py 2.1.0 pyhd8ed1ab_0 conda-forge
aiohttp 3.9.3 py311ha68e1ae_0 conda-forge
aiosignal 1.3.1 pyhd8ed1ab_0 conda-forge
attrs 23.2.0 pyh71513ae_0 conda-forge
blas 1.0 mkl
blinker 1.7.0 pyhd8ed1ab_0 conda-forge
bottleneck 1.3.7 py311hd7041d2_0
brotli-python 1.0.9 py311hd77b12b_7
bzip2 1.0.8 he774522_0
c-ares 1.26.0 hcfcfb64_0 conda-forge
ca-certificates 2024.2.2 h56e8100_0 conda-forge
cached-property 1.5.2 py_0
cachetools 5.3.2 pyhd8ed1ab_0 conda-forge
certifi 2024.2.2 py311haa95532_0
cffi 1.16.0 py311h2bbff1b_0
charset-normalizer 2.0.4 pyhd3eb1b0_0
click 8.1.7 win_pyh7428d3b_0 conda-forge
colorama 0.4.6 py311haa95532_0
contextlib2 21.6.0 py311haa95532_0
cryptography 41.0.3 py311h89fc84f_0
cuda-cccl 12.3.101 0 nvidia
cuda-cudart 12.1.105 0 nvidia
cuda-cudart-dev 12.1.105 0 nvidia
cuda-cupti 12.1.105 0 nvidia
cuda-libraries 12.1.0 0 nvidia
cuda-libraries-dev 12.1.0 0 nvidia
cuda-nvrtc 12.1.105 0 nvidia
cuda-nvrtc-dev 12.1.105 0 nvidia
cuda-nvtx 12.1.105 0 nvidia
cuda-opencl 12.3.101 0 nvidia
cuda-opencl-dev 12.3.101 0 nvidia
cuda-profiler-api 12.3.101 0 nvidia
cuda-runtime 12.1.0 0 nvidia
eigen 3.4.0 h91493d7_0 conda-forge
fftw 3.3.10 nompi_h38027f0_108 conda-forge
filelock 3.13.1 py311haa95532_0
freetype 2.12.1 ha860e81_0
frozenlist 1.4.1 py311ha68e1ae_0 conda-forge
giflib 5.2.1 h8cc25b3_3
gmpy2 2.1.2 py311h7f96b67_0
google-auth 2.28.0 pyhca7485f_0 conda-forge
google-auth-oauthlib 1.2.0 pyhd8ed1ab_0 conda-forge
grpc-cpp 1.48.2 h6772dbd_4
grpcio 1.48.2 py311h6772dbd_4
gtest 1.14.0 h91493d7_1 conda-forge
h5py 3.8.0 nompi_py311h3a26632_100 conda-forge
hdf5 1.12.2 nompi_h57737ce_101 conda-forge
icc_rt 2022.1.0 h6049295_2
idna 3.4 py311haa95532_0
importlib-metadata 7.0.1 pyha770c72_0 conda-forge
intel-openmp 2023.1.0 h59b6b97_46320
jinja2 3.1.2 py311haa95532_0
jpeg 9e h2bbff1b_1
lerc 3.0 hd77b12b_0
libaec 1.1.2 h63175ca_1 conda-forge
libboost 1.82.0 h3399ecb_2
libboost-python 1.82.0 py311h12feb9d_6 conda-forge
libcublas 12.1.0.26 0 nvidia
libcublas-dev 12.1.0.26 0 nvidia
libcufft 11.0.2.4 0 nvidia
libcufft-dev 11.0.2.4 0 nvidia
libcurand 10.3.4.101 0 nvidia
libcurand-dev 10.3.4.101 0 nvidia
libcurl 8.5.0 h86230a5_0
libcusolver 11.4.4.55 0 nvidia
libcusolver-dev 11.4.4.55 0 nvidia
libcusparse 12.0.2.55 0 nvidia
libcusparse-dev 12.0.2.55 0 nvidia
libdeflate 1.17 h2bbff1b_1
libffi 3.4.4 hd77b12b_0
libitk 5.3.0 h6e1890f_0 conda-forge
libjpeg-turbo 2.0.0 h196d8e1_0
libnpp 12.0.2.50 0 nvidia
libnpp-dev 12.0.2.50 0 nvidia
libnvjitlink 12.1.105 0 nvidia
libnvjitlink-dev 12.1.105 0 nvidia
libnvjpeg 12.1.1.14 0 nvidia
libnvjpeg-dev 12.1.1.14 0 nvidia
libpng 1.6.39 h8cc25b3_0
libprotobuf 3.20.3 h23ce68f_0
libssh2 1.10.0 he2ea4bf_2
libtiff 4.4.0 h8a3f274_2
libuv 1.44.2 h2bbff1b_0
libwebp 1.3.2 hbc33d0d_0
libwebp-base 1.3.2 h2bbff1b_0
libzlib 1.2.13 hcfcfb64_5 conda-forge
lz4-c 1.9.4 h2bbff1b_0
markdown 3.5.2 pyhd8ed1ab_0 conda-forge
markupsafe 2.1.1 py311h2bbff1b_0
medpy 0.4.0 py311h9ea8ea8_6 conda-forge
mkl 2023.1.0 h6b88ed4_46358
mkl-service 2.4.0 py311h2bbff1b_1
mkl_fft 1.3.8 py311h2bbff1b_0
mkl_random 1.2.4 py311h59b6b97_0
ml-collections 0.1.1 pyhd8ed1ab_0 conda-forge
mpc 1.1.0 h7edee0f_1
mpfr 4.0.2 h62dcd97_1
mpir 3.0.0 hec2e145_1
mpmath 1.3.0 py311haa95532_0
multidict 6.0.5 py311ha68e1ae_0 conda-forge
networkx 3.1 py311haa95532_0
numexpr 2.8.7 py311h1fcbade_0
numpy 1.26.2 py311hdab7c0b_0
numpy-base 1.26.2 py311hd01c5d8_0
oauthlib 3.2.2 pyhd8ed1ab_0 conda-forge
openjpeg 2.4.0 h4fc8c34_0
openssl 3.2.1 hcfcfb64_0 conda-forge
pandas 2.1.4 py311hf62ec03_0
pillow 10.0.1 py311h045eedc_0
pip 23.3.1 py311haa95532_0
protobuf 3.20.3 py311hd77b12b_0
pyasn1 0.5.1 pyhd8ed1ab_0 conda-forge
pyasn1-modules 0.3.0 pyhd8ed1ab_0 conda-forge
pycparser 2.21 pyhd3eb1b0_0
pyjwt 2.8.0 pyhd8ed1ab_1 conda-forge
pyopenssl 23.2.0 py311haa95532_0
pysocks 1.7.1 py311haa95532_0
python 3.11.5 he1021f5_0
python-dateutil 2.8.2 pyhd3eb1b0_0
python-tzdata 2023.3 pyhd3eb1b0_0
python_abi 3.11 2_cp311 conda-forge
pytorch 2.1.1 py3.11_cuda12.1_cudnn8_0 pytorch
pytorch-cuda 12.1 hde6ce7c_5 pytorch
pytorch-mutex 1.0 cuda pytorch
pytz 2023.3.post1 py311haa95532_0
pyu2f 0.1.5 pyhd8ed1ab_0 conda-forge
pyyaml 6.0.1 py311h2bbff1b_0
re2 2022.04.01 h0e60522_0 conda-forge
requests 2.31.0 py311haa95532_0
requests-oauthlib 1.3.1 pyhd8ed1ab_0 conda-forge
rsa 4.9 pyhd8ed1ab_0 conda-forge
scipy 1.11.4 py311hc1ccb85_0
setuptools 68.0.0 py311haa95532_0
simpleitk 2.2.1 py311h67644cf_1 conda-forge
six 1.16.0 pyhd3eb1b0_1
sqlite 3.41.2 h2bbff1b_0
sympy 1.12 py311haa95532_0
tbb 2021.8.0 h59b6b97_0
tensorboard 2.15.2 pyhd8ed1ab_0 conda-forge
tensorboard-data-server 0.7.0 py311h1ea47a8_1 conda-forge
tensorboardx 2.2 pyhd3eb1b0_0
tk 8.6.12 h2bbff1b_0
torchaudio 2.1.1 pypi_0 pypi
torchvision 0.16.1 pypi_0 pypi
tqdm 4.65.0 py311h746a85d_0
typing_extensions 4.7.1 py311haa95532_0
tzdata 2023c h04d1e81_0
ucrt 10.0.22621.0 h57928b3_0 conda-forge
urllib3 1.26.18 py311haa95532_0
vc 14.2 h21ff451_1
vc14_runtime 14.38.33130 h82b7239_18 conda-forge
vs2015_runtime 14.38.33130 hcb4865c_18 conda-forge
werkzeug 3.0.1 pyhd8ed1ab_0 conda-forge
wheel 0.41.2 py311haa95532_0
win_inet_pton 1.1.0 py311haa95532_0
xz 5.4.2 h8cc25b3_0
yaml 0.2.5 he774522_0
yarl 1.9.4 py311ha68e1ae_0 conda-forge
zipp 3.17.0 pyhd8ed1ab_0 conda-forge
zlib 1.2.13 hcfcfb64_5 conda-forge
zstd 1.5.5 hd43e919_0
I appreciate your prompt assistance to resolve this issue.
Best,
Mohammad