1

I have been having an issue installing SimpleITK>2.2. Fully reinstalled miniconda and I am still having issues. However, it works for SimpleITK<=2.1.1.1

Not sure what the issue is, but I’ve never had this sort of issue before. Not sure if it’s a conda, simpleitk, or windows issue. I’m on Windows 11 and the most updated conda (since fresh install).

C:\Miniconda3\envs>conda create -n main_env python=3.8 simpleitk=2.2 -c simpleitk -y
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Miniconda3\envs\main_env

  added / updated specs:
    - python=3.8
    - simpleitk=2.2


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    pip-23.2.1                 |   py38haa95532_0         2.8 MB
    python-3.8.17              |       h1aa4202_0        20.5 MB
    setuptools-68.0.0          |   py38haa95532_0         925 KB
    simpleitk-2.2.1            |   py38h82bb817_0        17.1 MB  simpleitk
    vc-14.2                    |       h21ff451_1           8 KB
    wheel-0.38.4               |   py38haa95532_0          83 KB
    ------------------------------------------------------------
                                           Total:        41.3 MB

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/win-64::ca-certificates-2023.05.30-haa95532_0
  jpeg               pkgs/main/win-64::jpeg-9e-h2bbff1b_1
  lerc               pkgs/main/win-64::lerc-3.0-hd77b12b_0
  libdeflate         pkgs/main/win-64::libdeflate-1.17-h2bbff1b_0
  libffi             pkgs/main/win-64::libffi-3.4.4-hd77b12b_0
  libpng             pkgs/main/win-64::libpng-1.6.39-h8cc25b3_0
  libtiff            pkgs/main/win-64::libtiff-4.4.0-h8a3f274_2
  lz4-c              pkgs/main/win-64::lz4-c-1.9.4-h2bbff1b_0
  openssl            pkgs/main/win-64::openssl-3.0.10-h2bbff1b_0
  pip                pkgs/main/win-64::pip-23.2.1-py38haa95532_0
  python             pkgs/main/win-64::python-3.8.17-h1aa4202_0
  setuptools         pkgs/main/win-64::setuptools-68.0.0-py38haa95532_0
  simpleitk          simpleitk/win-64::simpleitk-2.2.1-py38h82bb817_0
  sqlite             pkgs/main/win-64::sqlite-3.41.2-h2bbff1b_0
  tbb                pkgs/main/win-64::tbb-2021.8.0-h59b6b97_0
  vc                 pkgs/main/win-64::vc-14.2-h21ff451_1
  vs2015_runtime     pkgs/main/win-64::vs2015_runtime-14.27.29016-h5e58377_2
  wheel              pkgs/main/win-64::wheel-0.38.4-py38haa95532_0
  xz                 pkgs/main/win-64::xz-5.4.2-h8cc25b3_0
  zlib               pkgs/main/win-64::zlib-1.2.13-h8cc25b3_0
  zstd               pkgs/main/win-64::zstd-1.5.5-hd43e919_0

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

C:\Miniconda3\envs>conda activate main_env

(main_env) C:\Miniconda3\envs>python
Python 3.8.17 (default, Jul  5 2023, 20:44:21) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import SimpleITK
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Miniconda3\envs\main_env\lib\site-packages\SimpleITK\__init__.py", line 18, in <module>
    from SimpleITK.SimpleITK import *
  File "C:\Miniconda3\envs\main_env\lib\site-packages\SimpleITK\SimpleITK.py", line 13, in <module>
    from . import _SimpleITK
ImportError: DLL load failed while importing _SimpleITK: The specified module could not be found.
>>>
>>> exit()

(main_env) C:\Miniconda3\envs>conda install -c simpleitk simpleitk=2.1
Collecting package metadata (current_repodata.json): done
Solving environment: unsuccessful initial attempt using frozen solve. Retrying with flexible solve.
Solving environment: unsuccessful attempt using repodata from current_repodata.json, retrying with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Miniconda3\envs\main_env

  added / updated specs:
    - simpleitk=2.1


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    libtiff-4.2.0              |       h8a3f274_2         756 KB
    simpleitk-2.1.1.1          |   py38h82bb817_0        16.5 MB  simpleitk
    ------------------------------------------------------------
                                           Total:        17.3 MB

The following packages will be DOWNGRADED:

  libtiff                                  4.4.0-h8a3f274_2 --> 4.2.0-h8a3f274_2
  simpleitk                            2.2.1-py38h82bb817_0 --> 2.1.1.1-py38h82bb817_0


Proceed ([y]/n)? y


Downloading and Extracting Packages

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(main_env) C:\Miniconda3\envs>python
Python 3.8.17 (default, Jul  5 2023, 20:44:21) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import SimpleITK
>>> SimpleITK
<module 'SimpleITK' from 'C:\\Miniconda3\\envs\\main_env\\lib\\site-packages\\SimpleITK\\__init__.py'>
>>>
krolic
  • 51
  • 2

0 Answers0