Page MenuHomePhabricator | MITK

Error compiling Mitk 2016-11 : Error on SimpleITK installation phase (patch provided)
Closed, InvalidPublic


We are compiling the new release just as we did for the former one. Here are Python-relevant options we use with CMake :


where system values are :

set PYTHON_BASE=c:/dev/tools/anaconda250_amd64
set PATH=%PYTHON_BASE%/;%Path%
rem -- set PYTHONPATH=%CD%/ep/Lib/site-packages/

SimpleITK compiles fine, but cannot be installed :

     Build succeeded.
         0 Warning(s)
         0 Error(s)
     Time Elapsed 00:00:31.24
     Performing sitk_python_install_step step for 'SimpleITK'
     'PYTHONUSERBASE' is not recognized as an internal or external command,
     operable program or batch file.
51>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code

I may just be a missing "-D" or "set" but i was unable to find it.


Differential Revisions
Restricted Differential Revision

Event Timeline

aurelien created this task.Mar 2 2017, 9:22 AM

We fixed that in the previous version patching CMakeExternals/SimpleITK.cmake :

-          COMMAND PYTHONUSERBASE=${_install_dir} ${PYTHON_EXECUTABLE} install --prefix=${_install_dir}
+          COMMAND ${PYTHON_EXECUTABLE} install --prefix=${_install_dir}

It's not possible to have a variable declaration before a command in Windows.

Here is a simple patch wich fixes the command format. The PYTHONPATH has to be set before CMake is called.
basically, it has to be set to [compilation folder]ep/Lib/site-packages/

With that patch the installation process no longer fails under Windows.

aurelien renamed this task from Error compiling Mitk 2016-11 : Error on SimpleITK installation phase to Error compiling Mitk 2016-11 : Error on SimpleITK installation phase (patch provided).Mar 6 2017, 5:45 PM
kislinsk added a revision: Restricted Differential Revision.Mar 7 2017, 10:32 AM
kislinsk added a project: Pull Request.
kislinsk triaged this task as Normal priority.
kislinsk assigned this task to floca.May 2 2017, 5:03 PM
jernejf added a subscriber: jernejf.Jun 4 2017, 1:27 PM

Can someone just explain how to use this patch. I am fairly new to MITK and would be very thankful for an explanation!

@jernejf is suggest you to use WinMerge to apply the patch on your Mitk source tree.

kislinsk added a project: Restricted Project.Nov 27 2017, 1:58 PM
kislinsk claimed this task.
kislinsk added a subscriber: floca.
kislinsk removed kislinsk as the assignee of this task.Dec 18 2017, 4:22 AM
kislinsk added a subscriber: kislinsk.
kalali added a subscriber: kalali.Fri, Apr 12, 12:51 PM

Is this still an open topic?

kislinsk closed this task as Invalid.Fri, Apr 12, 3:29 PM

No, I think in 2018.04 we even do not have SimpleITK anymore. So, closing as Invalid eventhough it was valid back then.