1

I need to install azure library on my azure databricks. Right now I am installing it globally but sometime when cluster starts my notebook fails with error as below:

AttributeError: module 'lib' has no attribute 'SSL_ST_INIT'

what should be the best way to install a library on azure databricks, install it globally or install it locally on each notebook using dbutils.library.installPyPI(lib,version) ?

shubham nayak
  • 75
  • 2
  • 9

1 Answers1

1

there are an existing SO thread Databricks cluster does not initialize Azure library with error: module 'lib' has no attribute 'SSL_ST_INIT' with the same issue and a similar SO thread Python AttributeError: 'module' object has no attribute 'SSL_ST_INIT', which you may refer to.

To downgrade a Python library, please first to uninstall it and then to install with the specified version, for example as below.

  1. pip uninstall azure
  2. pip install azure==3.0.0

For more details about how to install libraries on Azure Databricks, please see the offical topic Libraries.

Peter Pan
  • 23,476
  • 4
  • 25
  • 43
  • I have gone through all these threads already. My question is what is the best way/practice to install a library on databricks, globally or locally? – shubham nayak Mar 18 '19 at 09:22
  • @shubhamnayak There is no standard answer for what the best way is. It's up to you and your scenario. The section [`Library lifecycles `](https://docs.databricks.com/user-guide/libraries.html#library-lifecycles) is partial answer based on usage scope I think. – Peter Pan Mar 18 '19 at 09:28