import error with shapely.geos
See original GitHub issueduring the import the aiplatform, I get the following error.
from google.cloud import aiplatform
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/__init__.py", line 24, in <module>
    from google.cloud.aiplatform import initializer
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/initializer.py", line 34, in <module>
    from google.cloud.aiplatform.metadata import metadata
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/metadata/metadata.py", line 25, in <module>
    from google.cloud.aiplatform import pipeline_jobs
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/pipeline_jobs.py", line 31, in <module>
    from google.cloud.aiplatform.metadata import artifact
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/metadata/artifact.py", line 25, in <module>
    from google.cloud.aiplatform import models
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/models.py", line 46, in <module>
    from google.cloud.aiplatform import jobs
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/aiplatform/jobs.py", line 26, in <module>
    from google.cloud import bigquery
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/__init__.py", line 35, in <module>
    from google.cloud.bigquery.client import Client
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/client.py", line 75, in <module>
    from google.cloud.bigquery.dataset import Dataset
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/dataset.py", line 25, in <module>
    from google.cloud.bigquery.routine import RoutineReference
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/routine/__init__.py", line 18, in <module>
    from google.cloud.bigquery.enums import DeterminismLevel
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/enums.py", line 21, in <module>
    from google.cloud.bigquery.query import ScalarQueryParameterType
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/query.py", line 23, in <module>
    from google.cloud.bigquery.table import _parse_schema_resource
  File "/home/vignesh/miniconda3/envs/the_new_age/lib/python3.10/site-packages/google/cloud/bigquery/table.py", line 44, in <module>
    _read_wkt = shapely.geos.WKTReader(shapely.geos.lgeos).read
AttributeError: module 'shapely.geos' has no attribute 'WKTReader'
google-cloud-aiplatform version 1.19.1
Issue Analytics
- State:
- Created 9 months ago
- Comments:9 (1 by maintainers)
 Top Results From Across the Web
Top Results From Across the Web
Error importing Polygon from shapely.geometry.polygon
If I type from shapely.geometry import Polygon in Eclipse, then I click on Polygon , then I press F3 , Eclipse is able...
Read more >Shapely command error: from shapely.geometry import ...
Shapely is your interface to GEOS. I'd start troubleshooting by trying to reinstall geopandas via conda so it checks that your dependencies ...
Read more >API: custom classes for GEOS exceptions · Issue #991
... Shapely has a few custom error classes, such as TopologicalError. Using an example from the tests: from shapely.geometry import Polygon ...
Read more >Shapely
Shapely wraps GEOS geometries and operations to provide both a feature rich ... import shapely >>> import numpy as np >>> geoms =...
Read more >[python] Shapely doesn't work correctly - General
... interpreter I get this errors: >>> from shapely. geometry import ... /shapely/coords.py", line 10, in <module> from shapely.geos import ...
Read more > Top Related Medium Post
Top Related Medium Post
No results found
 Top Related StackOverflow Question
Top Related StackOverflow Question
No results found
 Troubleshoot Live Code
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free Top Related Reddit Thread
Top Related Reddit Thread
No results found
 Top Related Hackernoon Post
Top Related Hackernoon Post
No results found
 Top Related Tweet
Top Related Tweet
No results found
 Top Related Dev.to Post
Top Related Dev.to Post
No results found
 Top Related Hashnode Post
Top Related Hashnode Post
No results found

https://github.com/googleapis/python-aiplatform/commit/1efd81666ac63e1704322ad5771b3208a35bc479 has been pushed out. We are pinning
shapely < 2.0.0to fix this error. Thanks for all the feedback and contribution!Same happens with
google-cloud-aiplatform==1.20.0. The issue is thatshapelyjust released version 2.0.0 on Dec 12, and it’s apparently not compatible with either aiplatform or bigquery.Steps to reproduce
In a clean virtual environment.
In a Python script:
Workaround
Pinning to the
shapelylatest version <2.0 as a constraint seems to fix it.