From Rose version 2.2.0 onwards, the standard PYTHONPATH environment variable is ignored by design to avoid conflicts between Rose’s internal Python environment and user-defined environments. To include custom Python modules in your Rose workflows, you must instead use the ROSE_PYTHONPATH environment variable.
When running Rose tasks under Cylc 8, this variable should be explicitly set in your suite.rc file using the pre-script directive for the appropriate task.
Example Cylc7 suite running in the compatible mode of Cylc8
[scheduling] [[dependencies]] graph = "rose_ana_test" [runtime] [[root]] env-script = "eval $(rose task-env)" [[[remote]]] host = localhost [[[job]]] batch system = background [[rose_ana_test]] pre-script = "export ROSE_PYTHONPATH=$PYTHON_MODULE_PATH" script = "rose task-run --verbose"
This configuration ensures that the specified path ($PYTHON_MODULE_PATH) is correctly included for Python module resolution during Rose ana task execution.
For more information, see: Rose PYTHONPATH change – Discourse thread