cancel
Showing results for 
Search instead for 
Did you mean: 
Summit 2024
Stay tuned for all the latest updates, insights, and highlights from the premier event in Databricks Data and AI Summit 2024.
cancel
Showing results for 
Search instead for 
Did you mean: 

Pre-install Python Libraries in volume and add to sys.path not working.

Ranjeet1981
New Contributor II

I saw the session on pre-installing the libraries.. 

--https://www.databricks.com/dataaisummit/session/goodbye-cluster-wait-time-hello-lightning-fast-rpy...

I implemented the steps to create a python file in "root/.ipython/profile_default/startup/" and that is executing fine and adding the path in sys.path.

But still import fails on libraries. 

If I do append in sys.path specifically in notebook that works. Can someone help me out in resolving this issue. 

 

2 REPLIES 2

Kaniz_Fatma
Community Manager
Community Manager

Hi @Ranjeet1981

  1. Double-check the path you have added to sys.path.append() in the startup script.
  2. Ensure that the path is correct and that the library is located in the specified directory.
  3. You can try printing sys.path in the startup script to verify that the path has been added correctly.

Yes I have verified path and libraries and got is second person verified, compared path in notebooks and even in notebook++. Path is correct, is there in sys.path but this concept still don’t work.