04-30-2025 02:20 AM
I am trying to execute pandas UDF in databricks. It gives me the following error on serverless compute,
File /local_disk0/.ephemeral_nfs/envs/pythonEnv-b11ff17c-9b25-4ccb-927d-06a7d1ca7221/lib/python3.11/site-packages/pyspark/sql/connect/client/core.py:2340, in SparkConnectClient._handle_rpc_error(self, rpc_error) 2325 raise Exception( 2326 "Python versions in the Spark Connect client and server are different. " 2327 "To execute user-defined functions, client and server should have the " (...) 2336 "https://docs.databricks.com/en/release-notes/serverless.html" target="_blank" rel="noopener noreferrer">https://docs.databricks.com/en/release-notes/serverless.html</a>.</span><span class="ansi-yellow-fg">"
As far as I am aware, I cannot change the python version of the client in serverless. Are there any ways to fix this issue from my side?
05-07-2025 04:19 AM
Serverless is management free which means you cannot choose the image. Hope this helps. Lou.
04-30-2025 06:56 AM
Correct, you cannot alter any pre-installed libraries on Serverless. Have you considered changing your client side Python to align with the version running on the Serverless cluster?
05-01-2025 11:21 PM
If I am using the databricks notebook with serverless attached, how do I change the client side python? I have control over client side python if I use databricks connect from my local setup, but is there a way to change the client side python version from databricks itself?
05-02-2025 04:42 AM
05-06-2025 11:07 PM
Thanks a lot for the reply! Final question: Is it possible for the end user to select a serverless client image version or is that not something that I can choose? If so, how? I couldn't find any documentation regarding this.
05-07-2025 04:19 AM
Serverless is management free which means you cannot choose the image. Hope this helps. Lou.
Passionate about hosting events and connecting people? Help us grow a vibrant local community—sign up today to get started!
Sign Up Now