Pip install of shapely giving “python setup.py egg_info” failed with error code 1 error

三世轮回 提交于 2021-02-09 04:15:31

问题


I am trying to install shapely 1.5.6 in Windows 10 (python 3). I am getting this strange error.

python setup.py egg_info" failed with error code 1 in c:\users\user1\appdata\local\temp\pip-build-g1iztcx1\shapely

I have tried updating pip but no luck. What could be the problem?


回答1:


Error code 1 means the "Operation is not permitted". Usually when that happens in Linux, you can just use sudo to resolve it. But on windows, you probably have to right-click on cmd and run as administrator to resolve it.

If unable to resolve it then try using easy_install to install the module. Then if still cannot, try updating the setuptools and pip. pip install --upgrade setuptools, pip install --upgrade pip.




回答2:


You can directly download the Shapely Wheel here and run pip install Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl (depending on the name of the package you decided to download).
This worked well for me with Windows 10 and python 3.




回答3:


In case you are still getting errors with the above solutions just make sure that the shapely wheel you are downloading (here) is the correct one and matching your system's requirements. Make sure you choose the correct 32 bit or 64 bit that also matches the python version (cp37 is for python 3.7). After downloading the file and moving it to your Python directory, run the administrative cmd on Python directory and run:

py -3.7 -m pip install Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl

(Shapely-1.6.4.post1-cp37-cp37m-win_amd64.whl is the name of the wheel you decide to download)



来源:https://stackoverflow.com/questions/48493192/pip-install-of-shapely-giving-python-setup-py-egg-info-failed-with-error-code

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!