itk pip package fails to install required version

python

(Julien Finet) #1

Hi,

When requiring a specific itk version, (using pip install itk==5.0b1), all the itk sub packages are installed to their latest versions (itk 5.0rc1 as of today). See as follow:

pip install itk==5.0b1

    Collecting itk==5.0b1
      Using cached https://files.pythonhosted.org/packages/7f/73/862c2e85bc501ffce7e7644dd2d0a05e36676876fbd73a167e712bf4b8f0/itk-5.0b1-cp35-cp35m-win_amd64.whl
    Collecting itk-segmentation>=5.0b1 (from itk==5.0b1)
      Downloading https://files.pythonhosted.org/packages/a0/a9/8aea2b7c3751a6738a56772c6f76b03f6686abdb71f3f453dfb604b9bf70/itk_segmentation-5.0rc1-cp35-cp35m-win_amd64.whl (3.9MB)
        100% |3.9MB 1.8MB/s
    Collecting numpy (from itk==5.0b1)
      Using cached https://files.pythonhosted.org/packages/2d/96/dc231b4bcd8781c16102e3deb5c857a39115917fe5abb8b137a36e453637/numpy-1.16.1-cp35-cp35m-win_amd64.whl
    Collecting itk-io>=5.0b1 (from itk==5.0b1)
      Downloading https://files.pythonhosted.org/packages/06/e1/1918525d4f4a71dde14bb00cd4db5b6c8b6bf030f0400de9567486fd0436/itk_io-5.0rc1-cp35-cp35m-win_amd64.whl (6.1MB)
        100% | 6.1MB 1.0MB/s
    Collecting itk-core>=5.0b1 (from itk==5.0b1)
      Downloading https://files.pythonhosted.org/packages/97/25/ef30f14d0687a32f9db56367f7abae2145a2dcc24604ef9a5c0417b8f549/itk_core-5.0rc1-cp35-cp35m-win_amd64.whl (25.5MB)

The only way I found to install a specific version of itk is to do the following:

pip uninstall itk itk-core itk-numerics itk-filtering itk-io itk-segmentation itk-registration itk-vtkglue vtk
pip install itk-core==5.0b1 itk-numerics==5.0b1 itk-filtering==5.0b1 itk-io==5.0b1 itk-segmentation==5.0b1 itk-registration==5.0b1 --force-reinstall --no-cache-dir
pip install itk==5.0b1
pip install itk-vtkglue

Thanks,
Julien.


(Matt McCormick) #2

Hi Julien,

Please review this patch, which will make the group wheels have a strict dependency in future versions:

https://github.com/InsightSoftwareConsortium/ITKPythonPackage/pull/123

Thanks,
Matt


(Julien Finet) #3

Thanks Matt,

Julien.