ResInsight icon indicating copy to clipboard operation
ResInsight copied to clipboard

Set Python executable path at compile-time

Open pinkwah opened this issue 3 years ago • 0 comments

Our ResInsight's rips is compiled for Python 3.6. If a virtual environment is created for a different version of Python (in our case 3.8), then the python executable will point to the virtualenv's version.

I propose that the default python string should be compile-time overridable so that it can be set to the correct string. In this case, a default of python3.6 would have the correct behaviour. However, in RHEL7 using Python 3.8 SCL, we'd like to hardcode the path as /opt/rh/rh-python38/root/usr/bin/python3.8 so that it's available regardless of the user's environment.

https://github.com/OPM/ResInsight/blob/7a0bfd49176eee70bfe05023c5f905aec186ad1b/ApplicationLibCode/Application/RiaPreferences.cpp#L128

Maybe via a new CMake option RESINSIGHT_DEFAULT_PYTHON_EXECUTABLE which defaults to python?

pinkwah avatar Jul 08 '22 11:07 pinkwah