0

我想使用 python 以编程方式进行空间连接。我试图从 https://pypi.python.org/pypi/Shapely在我的(windows 7 64 位)PC 中安装匀称。当我在我的 python shell 中执行 import 时,它可以工作。但是,如果我从 shapely.geometry 导入点执行,它不会引发任何模块发现错误。你能请任何人指导我解决这个问题吗?

4

2 回答 2

0

您可以下载旧版本的 python(如 python 3.3.3),使用 .exe 安装程序(https://pypi.python.org/pypi/Shapely/1.3.3)为 python3 添加 DLL,然后重新在 python 3.5 中再次安装 shapely 模块(http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely )

于 2016-03-16T21:30:05.197 回答
0

Just had the same issue, only mine was: "WindowsError: [Error 126] The specified module could not be found"

It might not be the same problem , but I'll tell what I did to have it imported without any fuss. I had downloaded shapely using the command " pip install Shapely " from a command prompt. I did not have any issues with that so far, it appeared this had been done successfully. Then came the previously mentioned error.

After some time, I came accross the github page in the ReadMe section (https://github.com/Toblerity/Shapely/blob/master/README.rst), and got this link from it:

http://www.lfd.uci.edu/~gohlke/pythonlibs/#shapely

The only thing to do then is to go to the "shapely" section, download the correct version for your system (win32,win32-amd64...), unpack it and copy paste the whole in your package location (That would be, in case like me you're not gifted with computers, where are things like numpy, matplotlib etc...).

Now looking at both packages I think the first one I downloaded was lacking certain DLL's (geos in fact) , which would explain why it was not capable of finding the module.. Since your error is very similar to mine, it could be that

Anyway hope that helps

于 2015-07-07T14:28:27.773 回答