cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

If I import a library in a notebook, will it be available for everyone using the cluster?

User16826992666
Valued Contributor
 
1 ACCEPTED SOLUTION

Accepted Solutions

sean_owen
Honored Contributor II

No. If you use %pip or %conda to attach a library, then it will only affect the execution of the notebook. A separate virtualenv is created for each notebook and its dependencies, even on a shared cluster.

If you create a Library in the workspace and attach it to the cluster in the cluster UI, then that does affect all users of the cluster.

View solution in original post

1 REPLY 1

sean_owen
Honored Contributor II

No. If you use %pip or %conda to attach a library, then it will only affect the execution of the notebook. A separate virtualenv is created for each notebook and its dependencies, even on a shared cluster.

If you create a Library in the workspace and attach it to the cluster in the cluster UI, then that does affect all users of the cluster.

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