cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Community Platform Discussions
Connect with fellow community members to discuss general topics related to the Databricks platform, industry trends, and best practices. Share experiences, ask questions, and foster collaboration within the community.
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!

Connect with Databricks Users in Your Area

Join a Regional User Group to connect with local Databricks users. Events will be happening in your city, and you wonโ€™t want to miss the chance to attend and share knowledge.

If there isnโ€™t a group near you, start one and help create a community that brings people together.

Request a New Group