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: 

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.

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!