在windows (从.whl下载https://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely文件)中正确安装后,获得以下错误:
from shapely.geometry import Point
Traceback (most recent call last):
File "<ipython-input-48-df8e65c5217a>", line 1, in <module>
from shapely.geometry import Point
File "C:\Anaconda3\lib\site-packages\shapely\geometry\__init__.py", line 23, in <module>
import shapely.speedups
File "C:\Anaconda3\lib\site-packages\shapely\speedups\__init__.py", line 99, in <module>
enable()
File "C:\Anaconda3\lib\site-packages\shapely\speedups\__init__.py", line 69, in enable
_orig['affine_transform'] = shapely.affinity.affine_transform
AttributeError: module 'shapely' has no attribute 'affinity'
发布于 2020-02-25 11:55:53
首先使用相同的站点安装Shapely的依赖项。对我来说,下面的程序起作用了。我在windows 64位上使用python3.6。
按以下顺序安装车轮:
1: GDAL-2.4.1-cp36-cp36m-win_amd64.whl
2: Fiona-1.8.6-cp36-cp36m-win_amd64.whl
3: Shapely-1.6.4.post2-cp36-cp36m-win_amd64.whl
这将导致正确安装Shapely模块。
https://stackoverflow.com/questions/60393906
复制相似问题