spacv icon indicating copy to clipboard operation
spacv copied to clipboard

cannot import name 'asPolygon' from 'shapely.geometry'

Open p91g opened this issue 2 years ago • 2 comments

Hi there,

I have the latest version of shapely and it doesn't seem to recognise 'asPolygon'. Has this been depreciated from shapely?

import spacv Traceback (most recent call last): File "", line 1, in File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv_init_.py", line 5, in from .spacv import * File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv\spacv.py", line 7, in from .grid_builder import construct_blocks, assign_pt_to_grid File "C:\Users\x\Documents\spopt_venv\lib\site-packages\spacv\grid_builder.py", line 3, in from shapely.geometry import Polygon, asPolygon ImportError: cannot import name 'asPolygon' from 'shapely.geometry' (C:\Users\x\Documents\spopt_venv\lib\site-packages\shapely\geometry_init_.py)

Any recommendations would be greatly appreciated :)

P

p91g avatar Nov 25 '23 15:11 p91g

I encountered an error as well. If you have a solution, please let me know how you resolved it. Thank you

aszani avatar Dec 14 '23 05:12 aszani

~I've downloaded the PR #6 via spacv @ git+https://github.com/dluks/spacv@master (spacv==0.0.22) in my requirements.txt but I keep getting~

ImportError: cannot import name 'asPolygon' from 'shapely.geometry'

EDIT: do pip uninstall spacv before reinstalling with pip install git+https://github.com/dluks/spacv@master

arkanoid87 avatar Sep 16 '24 22:09 arkanoid87