Hi again,

since Python3 also affects the configuration/builds of a few third-party 
dependencies of MITK, you should configure and generate the MITK-superbuild 
with MITK_USE_Python3 instead of just the MITK-build. This will build the 
missing CTK libraries for example but also even more important changes and 
additions in third-party libraries like SWIG. That being said, the state of 
Python support in our develop and master branch is highly experimental and old. 
In fact, we are rewriting our whole Python backend right now and basically 
everything will change completely. I would advise to wait a few weeks in that 
regard if you can do so.

Best,
Stefan 
________________________________________
Von: Mujassim Jamal <mujassimjama...@gmail.com>
Gesendet: Samstag, 5. April 2025 07:09
An: mitk-users@lists.sourceforge.net
Betreff: [Extern] - [mitk-users] Issue Enabling Python3 Support in MITK 2024.12

Hello,

I have successfully built MITK 2024.12 without Python3. Now, I have decided to 
reconfigure it to include Python3 support. I followed the official 
documentation, which instructs setting the variable 'MITK_USE_Python3' in 
CMake-GUI. I enabled this option and reconfigured the project. It appears that 
CMake successfully detected Python along with the required modules. Here is the 
relevant log message from CMake-GUI during reconfiguration:
'''
Found Python3: C:/Users/mj/AppData/Local/Programs/Python/Python313/python.exe 
(found suitable version "3.13.1", minimum required is "3.8") found components: 
Interpreter Development NumPy Development.Module Development.Embed
'''

After that, I generated the project and opened it in Visual Studio, but I 
encountered the following error:
'''
29>CMake Error at CMake/mitkFunctionCreatePlugin.cmake:80 (message):
29>  org_mitk_gui_qt_python is missing requirements and won't be built.
29>  Missing: MitkQtPython
29>Call Stack (most recent call first):
29>  Plugins/org.mitk.gui.qt.python/CMakeLists.txt:5 (mitk_create_plugin)
29>
'''

In the 'FEATURE SUMMARY FOR MITK' section of the build log, it shows that 
'MitkPython' is enabled, but 'MitkQtPython' is missing.

After debugging, I discovered that even though 'MITK_USE_Python3' is enabled, 
the variables 'CTKScriptingPythonCore_INCLUDE_DIRS' and 
'CTKScriptingPythonWidgets_INCLUDE_DIRS' in Modules/QtPython/CMakeLists.txt 
appear to be missing. To verify this, I added a print statement inside the if 
condition that checks for these variables, but it was never logged during the 
build process.

I believe this is likely the reason why 'MitkQtPython' is not being built and 
is missing.

I would greatly appreciate any help on this matter.

Best,
Mujassim




_______________________________________________
mitk-users mailing list
mitk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mitk-users

Reply via email to