cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
cancel
Showing results for 
Search instead for 
Did you mean: 

Can't import st_constructors module after installing Apache Sedona

jgsp
New Contributor II

Hi there,

I've recently installed Apache Sedona on my cluster, according to the detailed instructions here. My Databricks runtime version is 9.1 LTS (includes Apache Spark 3.1.2, Scala 2.12).

The installation included the apache-sedona library from PyPI, and the following Maven Coordinates:

org.apache.sedona:sedona-python-adapter-3.0_2.12:1.2.1-incubating

org.datasyslab:geotools-wrapper:1.1.0-25.2

The installation was successful. Unfortunately, when I try to import the st_constructors as instructed here, I get the following error:

from sedona.sql import st_constructors as stc
 
# ImportError: cannot import name 'st_constructors' from 'sedona.sql' (/databricks/python/lib/python3.8/site-packages/sedona/sql/__init__.py)

What am I doing wrong here?

Many thanks for your help.

2 REPLIES 2

Debayan
Esteemed Contributor III
Esteemed Contributor III

Hi @Jonathan Gat​ , Can you try to uploading the executable PyPI file to DBFS and try to install it from there? You can refer: https://docs.databricks.com/libraries/index.html

jgsp
New Contributor II

Thank you @Debayan Mukherjee​ for the prompt reply. I've followed the instructions carefully, but now every time I try to run a cell in my notebook I get a "Cancelled" message. It clearly didn't work. Any advice?

Your help is much appreciated.

Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.