cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Get Started Discussions
Start your journey with Databricks by joining discussions on getting started guides, tutorials, and introductory topics. Connect with beginners and experts alike to kickstart your Databricks experience.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Uninstalling a preinstalled python package from Databricks

KrishZ
Contributor

[Datasets](https://pypi.org/project/datasets/) python package comes preinstalled on databricks clusters. I want to uninstall it or completely prevent it's installation when I create/start a cluster.

I couldn't find any solution on stackoverflow.
And I have tried !pip uninstall datasets in a notebook. It throws the below error

```
Found existing installation: datasets 2.12.0
Not uninstalling datasets at /databricks/python3/lib/python3.10/site-packages, outside environment /local_disk0/.ephemeral_nfs/envs/pythonEnv-some-long-uu-id-I-have-hidden
Can't uninstall 'datasets'. No files were found to uninstall.
```

Can someone guide on what to do here ?

 

1 REPLY 1

sean_owen
Databricks Employee
Databricks Employee

@Retired_mod note that you can't actually uninstall packages in the runtime with pip.

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now