cancel
Showing results for 
Search instead for 
Did you mean: 
Community Discussions
cancel
Showing results for 
Search instead for 
Did you mean: 

How to run a different python version then the default one on databricks cluster

deficiant_codge
Contributor II

Hi All,

 

I recently have a use case where i need to run something on the databricks cluster and the bare requirement is that python version shoulde be 3.8 and DBR version should be 11+. I am confused on how to handle this. Is there anyway in which we can define the python version or creating a virtual env?

5 REPLIES 5

BriceBuso
Contributor II

Hello @deficiant_codge , 

I think it's not possible to modify the python version from a cluster manually without touching the DBR. 
Indeed each version of DBR is coming with a specific version of Python, Spark and Scala. (You can see for each runtime the information about the versions (spark, new features...)  : https://learn.microsoft.com/en-us/azure/databricks/release-notes/runtime/releases ). 

Only way to switch of version is too switch of Runtime. 

Finally just found a possible trick, you can maybe use a Docker image as poet_RY specified in this post: https://community.databricks.com/t5/data-engineering/upgrade-python-version-in-cluster/m-p/5431

Hey Brice, 

Thanks for the response, but can you help me out on understanding how will i put this docker image on Databricks I am a very basic user and not much clear on that any blog or post will help,

Thanks

Hey,

To be honest I don't really know... 

You can check this stack Overflow post, the last reply is explaining how to do it. 
Moreover, there is this documentation from Databricks on the subject: https://docs.databricks.com/clusters/custom-containers.html 

Anonymous
Not applicable

Hi @deficiant_codge 

Hope everything is going great.

Just wanted to check in if you were able to resolve your issue. If yes, would you be happy to mark an answer as best so that other members can find the solution more quickly? If not, please tell us so we can help you. 

Cheers!

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.