Can I use ArcGIS python API in Azure DataBricks platforms??

3316
4
05-13-2019 11:19 PM
SuraviMahanta
New Contributor

I went through different ArcGIS tutorial and guide, however I didn't find any way to use ArcGIS with python API in DataBricks.

Tags (1)
0 Kudos
4 Replies
DominicStubbins
Esri Contributor

I was able to install the arcgis package from PyPI into databricks (azure databricks). just follow the import library workflow and type "arcgis" into the PyPI library box.

However I then ran into this issue https://docs.databricks.com/user-guide/faq/python-command-cancelled.html and have not had a chance to go back and work through this, seems like there is a big overlap in libraries of different versions so there may be challenges..

I also had a bit more success installing the library into the notebook context using

dbutils.library.installPyPI("arcgis")
dbutils.library.restartPython()

in the first notebook cell.

SimonGIS
New Contributor III

Is this still the preferred approach for getting ArcGIS API for Python into Databricks?  I have Geoanalytics Engine all setup in a Databricks Workspace on Azure, but just looking for steps on how to incorporate the ArcGIS API for Python as well.

 

I assumed I would be able to install at the cluster level so all notebooks would be able to import it when required:

arcgis==2.2.0

SimonGIS_0-1696316179936.png

However this fails

SimonGIS_1-1696316193082.png

 

 

Roxana_ElenaUrdea
New Contributor III

Hi Simon, I also have issues on using arcgis library on Databricks cluster. Even the library seem to be correctly installed, fails importing arcgis.

Roxana_ElenaUrdea_0-1711621778599.png

Roxana_ElenaUrdea_1-1711621855082.png

Does anyone has similar issues?

Thank you,

Roxana

0 Kudos
EsriLocalLogic
New Contributor

@SimonGIS @Roxana_ElenaUrdea I was able to get the arcgis library installed on Databricks by running the command sudo apt-get install libkrb5-dev in a terminal. You can open a terminal window by clicking the little icon in the bottom right of a Databricks Notebook page (see attached image). After that, I was able to run %pip install arcgis in a notebook cell, and it installed okay (albeit with some non-critical warnings). Hope that helps!

EsriLocalLogic_0-1712882612658.png

 

 

0 Kudos