我想运行this example。它在第一行失败:
$ python3
>>> import shapefile
ModuleNotFoundError: No module named 'shapefile'显然,shapefile不在标准库中。当我search in PyPi时,我得到了结果,但在第一个结果中没有提供import shapefile,所以不清楚这是否适用于我。
我是否遗漏了什么,我是否应该在没有任何推理的情况下尝试PyPi搜索中的所有匹配项?我有点迷路了.
发布于 2019-05-29 21:27:07
我认为您正在查看的页面可能已过期。
首先在命令行上运行pip install pyshp。然后在Python提示符中输入import shapefile。
这对我在Python 3.5.6上是有效的。
发布于 2019-05-29 21:26:43
要运行import shapefile,您需要安装pyshp库。
需要先执行pip install pyshp,然后再运行import shapefile
https://stackoverflow.com/questions/56361642
复制相似问题