The default Python version for Decision Optimization models will soon be changing from Python 3.9 to Python 3.10 in IBM Cloud Pak for Data. When this change happens you will notice that the default option displays 3.10.
Python is used to run Decision Optimization models formulated in DOcplex (a native Python API for Decision Optimization) in both Decision Optimization experiments and Jupyter notebooks. Modeling Assistant models also use Python because DOcplex code is generated when models are deployed. Models formulated in OPL (a modeling language), or in specific file formats for CPLEX or CP Optimizer (the solver engines), such as LP or CPO formats, are not affected by this Python update.
Do I need to update my Python version?
If your models use the default Python version no change is required because the upgrade will be handled automatically. If however you have explicitly specified an older Python version in your model, you must update this version specification or your models will not work.
Decision Optimization experiments
You can view and change the Python environment in the experiment Overview on the Environment tab of the Information pane. See Overview for more details. You can create environments by selecting "new Python environment" in the Environment tab drop-down menu. This sets the environment to be used by default for your experiment. You can also choose different environments for individual scenarios on the Environment tab of the Run configuration pane. This can be useful if you don't want certain scenarios to use the default environment. See Run environment tab for more details.
You can change your Python version by changing the environment in your notebook. For Jupyter notebooks that use older versions of Python, you can change the Python version by selecting Change environment in the list of actions. Before you can edit your notebook, you must first select a supported environment. When your notebook is open for editing, you can select an environment definition on the Environment tab in the Information pane in your notebook. See Decision Optimization notebooks.
Existing deployed models
You can either recreate and redeploy your model, or change the Python version using the REST API without having to redeploy your model.