cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

init_script breaks Notebooks

stadelmannkevin
Visitor

 

Hi everyone

We would like to use our private company Python repository for installing Python libraries with pip install.

To achieve this, I created a simple script which sets the index-url configuration of pip to our private repo

I set this script as an init_script for my personal compute cluster.

When I start the cluster, the script loads successfully, and I can see that the two lines are correctly added to the pip.conf file.

However, here's the issue: I am unable to execute any Python/Spark/SQL/R commands from a notebook attached to this cluster. As a result, pip install <library> also doesn't work in the notebook.

Interestingly, when I run pip install directly in the cluster's web terminal, it works perfectly as intended.

Has anyone encountered similar issues?

PS: Just tested: any init_script will cause the same issue, even if the init script is empty! I'm not able to execute any language commands in a attacked notebook.

2 REPLIES 2

Walter_C
Databricks Employee
Databricks Employee

Does it throws any error message or it just hangs? Have you tried additional DBRs on the cluster to see if this is an issue with the DBR version being run or general issue?

PabloCSD
Contributor III

I had a similar issue, I installed a private library and I could not use the cluster in a notebook for any commands.

I fixed it cloning the cluster, it was like the cluster was saturated. The error I got was something like this:

Failure starting repl. Try detaching and re-attaching the notebook.

Other alternative is to install the new libraries in the notebook instead of using an init_script in the first cells.

Hope it works!

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