简体   繁体   中英

Installation of Shapely module in windows 7 64 bit.

I would like to do spatial join pro-grammatically using python. I have tried to install shapely in my (windows 7 64 bit) pc from https://pypi.python.org/pypi/Shapely . When I execute import shapely in my python shell, it works. But it raises no module found error, if I execute from shapely.geometry import Point. Could you please anyone guide me in this concern ?

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

您可以下载旧版本的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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM