Data Lab Python 3.11 Compatibility Guide
Python 3.8 is reaching its end-of-life in October 2024, and it's essential to transition to Python 3.11 to maintain compatibility and take advantage of new features and improvements. This guide provides step-by-step instructions on updating your existing Python 3.8 notebooks to use the Python 3.11 kernel within the Data Lab environment.
In Seeq Data Lab, navigate to the Launcher tab. If the Python 3.11 option is not visible, you will need an upgrade of your Seeq installation in order to use this compatibility guide. To proceed with the upgrade, please submit a support request indicating you need an “Upgrade to Python 3.11”.
Step-by-Step Process for Updating to Python 3.11
1. Identify and Open Projects Needing Update
Priority should be given to Projects that:
are frequently used
are part of critical workflows
are shared with many users
have Add-on Tools
have Notebooks that are executed as a scheduled job
The Data Lab Environment Manager provides a Projects Overview that can be used to list, filter, and open these Projects.
2. Identify Notebooks for Update
After opening the Project, identify the specific notebooks that require updating to Python 3.11:
Use the Data Lab Environment Manager: Open the Data Lab Environment Manager and navigate to the Notebooks Overview section. This section lists all the notebooks within the project, showing the currently selected kernel.
Check Selected Kernel Versions: Identify which notebooks are still using
Python 3.8
. These are the notebooks that need to be updated toPython 3.11
.
3. Update Notebooks to Python 3.11
Once you have identified the notebooks that need updating, proceed as follows:
Open the Notebook: Double-click on the notebook you want to update to open it in the Jupyter Lab interface.
Select Python 3.11 Kernel:
Click on the current kernel name (e.g.,
Python 3.8
) located at the top right corner of the Jupyter Lab interface.From the dropdown menu, choose
Python 3.11
and click the Select button.
Run the Notebook: Execute the cells in the notebook and test if the code runs as expected with
Python 3.11
.Fix Issues:
If import errors occur or packages are missing, install the respective package and try again.
Note: Users can use the Data Lab Environment Manager to install the missing packages.Update the code as needed to ensure compatibility with
Python 3.11
.
Save the Notebook: After confirming that the notebook works correctly, save the changes.
In the case of a scheduled notebook, if you have unscheduled it during testing, ensure that you schedule it again after you confirm that the notebook works correctly.
Conclusion
By following this guide, you can smoothly transition your Data Lab Project notebooks from Python 3.8 to Python 3.11. The Data Lab Environment Manager is a valuable resource for identifying notebooks that need updates, managing package installations, and ensuring a seamless transition. By updating your projects, notebooks, and Add-ons to Python 3.11, you ensure your projects will continue to work when Python 3.8 is removed from Data Lab.