创建 shapely 的 Polygon 给 malloc

Creating shapely's Polygon gives malloc

我有以下坐标,我想计算多边形的面积。在我还没来得及进行区域计算之前,我遇到了以下 malloc 错误:

python3(24115,0x1150b2dc0) malloc: *** error for object 0x10fe90960: pointer being freed was not allocated
python3(24115,0x1150b2dc0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      python3 polygons.py

我的代码:

from shapely.geometry import Polygon
points = [(1.9046687355667333, 56.23551023807152), (1.9048036984917063, 56.24680521031975), (1.9197029814434226, 56.24663611723459), (1.9346024475394754, 56.24648039234242), (1.9495020841662953, 56.2463380360075), (1.9644018787283948, 56.246209048575835), (1.9793018186014029, 56.24609343040593), (1.994201891192725, 56.24599118182762), (1.9941284953105824, 56.23469488377984), (1.9792181613441933, 56.23479733138695), (1.96430796016182, 56.23491315736771), (1.949397904385022, 56.235042361374965), (1.9344880066132888, 56.23518494306894), (1.9195782794710594, 56.235340902086214), (1.9046687355667333, 56.23551023807152)]
Polygon(points)

编辑: 运行 在 MacOS Catalina 10.15.4 上

Python 3.7.3

pip 版本:20.0.2

匀称:1.7.0

问题出在 Python 环境上。我必须创建一个新的并安装我所有的依赖项,然后它才能工作。