- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:02 PM
I'm trying to create a spark udf for a registered model and getting:
Exception: Python versions in the Spark Connect client and server are different. To execute user-defined functions, client and server should have the same minor Python version. Please update the Python version in the client. You can check the current Python version on the server by running `spark.sql('select current_version()').show()` or by consulting Databricks release notes. Release notes for cluster compute can be found at https://docs.databricks.com/en/release-notes/runtime/index.html and release notes for serverless can be found at https://docs.databricks.com/en/release-notes/serverless.html.
But
>>> spark.sql('select current_version()').show(truncate=False)
+-------------------------------------------------------------------------------------------------------------------+
|current_version() |
+-------------------------------------------------------------------------------------------------------------------+
|{16.1.x-photon-scala2.12, NULL, bb77706b447f7a5eb0b80ed951276c31f44da631, b3638694ebd6dce2d742ae94b812e7b0302df1d0}|
+-------------------------------------------------------------------------------------------------------------------+
And the 16.x release notes don't say what Python version is used.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:07 PM
Hi @unj1m,
Python version for DBR version 16.X is
-
Python: 3.12.3
https://docs.databricks.com/en/release-notes/runtime/16.1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:07 PM
Hi @unj1m,
Python version for DBR version 16.X is
-
Python: 3.12.3
https://docs.databricks.com/en/release-notes/runtime/16.1.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:09 PM
Dang, I was looking for 3.11. My bad. 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2024 12:26 PM
No problem! 😁
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
Does this mean that:
1. A new dbx runtime comes out
2. Serverless compute automatically switches to the new runtime + new python version
3. Any external environments that use serverless ie, local VScode / CICD environments also need to upgrade their python versions immediately or else serverless starts crashing due to this error?

