genthalili / searoute-py

A python package to calculate the shortest sea route between two points on Earth.
Apache License 2.0
63 stars 14 forks source link

Error importing searoute #13

Closed javiersando closed 10 months ago

javiersando commented 1 year ago

I'm getting the following error when importing searoute. Uninstalling and reinstalling doesn't solve the problem:

Traceback (most recent call last):

  File ~\AppData\Local\anaconda3\lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\abcd\desktop\temp2.py:11
    import searoute as sr

  File ~\AppData\Local\anaconda3\lib\site-packages\searoute\__init__.py:2
    from .searoute import searoute

  File ~\AppData\Local\anaconda3\lib\site-packages\searoute\searoute.py:3
   import osmnx as ox

  File ~\AppData\Local\anaconda3\lib\site-packages\osmnx\__init__.py:3
    from ._api import *

  File ~\AppData\Local\anaconda3\lib\site-packages\osmnx\_api.py:17
    from .geometries import geometries_from_address

  File ~\AppData\Local\anaconda3\lib\site-packages\osmnx\geometries.py:17
    from shapely.errors import GEOSException

ImportError: cannot import name 'GEOSException' from 'shapely.errors' (C:\Users\sand_jq\AppData\Local\anaconda3\lib\site-packages\shapely\errors.py)

I'm using Spyder 5.4.1, Python 3.10.9, shapely 2.0.1, and searoute 1.0.9.

genthalili commented 1 year ago

Hi @javiersando Were you able to fix this? It looks like the issue is comming from shaply package installed on your pc, maybe the version..