Description
If non-default Python version is chosen for ITK by creating cache entry Python3_ROOT_DIR (e.g. setting it to C:/Program Files/Python37), it needs to be also created and set to the same path for all the externally built remote modules too. Otherwise a run-time issue is created when trying to import itk:
Message=Module use of python38.dll conflicts with this version of Python.
Source=M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\StrainPython.py
StackTrace:
File "M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\StrainPython.py", line 13, in <module>
from . import _StrainPython
File "M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\support\itkBase.py", line 262, in load
l_spec.loader.exec_module(l_module) # pytype: disable=attribute-error
File "M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\support\itkBase.py", line 110, in itk_load_swig_module
l_module = loader.load(swig_module_name)
File "M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\__init__.py", line 111, in _initialize_module
_itkBase.itk_load_swig_module(module, sys.modules[__name__].__dict__)
File "M:\Dev\ITK-vs19\Wrapping\Generators\Python\itk\__init__.py", line 123, in <module>
_initialize_module()
File "M:\Dev\ITK-git\Modules\Filtering\ImageIntensity\wrapping\test\itkImageFilterNumPyInputsTest.py", line 21, in <module>
import itk
Expected behavior
Externally built remote modules pick up Python version from ITK, so duplicating manual specification of Python version is not necessary.
Versions
Affects current master.
Description
If non-default Python version is chosen for ITK by creating cache entry
Python3_ROOT_DIR(e.g. setting it toC:/Program Files/Python37), it needs to be also created and set to the same path for all the externally built remote modules too. Otherwise a run-time issue is created when trying toimport itk:Expected behavior
Externally built remote modules pick up Python version from ITK, so duplicating manual specification of Python version is not necessary.
Versions
Affects current master.