前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >『开发技术』解决 Windows安装shapely|pip install shapely 失败问题

『开发技术』解决 Windows安装shapely|pip install shapely 失败问题

作者头像
小宋是呢
发布2022-03-07 14:02:26
1.7K0
发布2022-03-07 14:02:26
举报
文章被收录于专栏:深度应用深度应用

0. 问题描述

当在windows 安装 python shapely包的时候,会报错如下:

代码语言:javascript
复制
C:\Users\xiaos>pip install shapely
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting shapely
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz (225kB)
     |████████████████████████████████| 235kB 1.7MB/s
    ERROR: Complete output from command python setup.py egg_info:
    ERROR: Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\setup.py", line 80, in <module>
        from shapely._buildcfg import geos_version_string, geos_version, \
      File "C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\shapely\_buildcfg.py", line 200, in <module>
        lgeos = CDLL("geos_c.dll")
      File "C:\Datas\Apps\RJ\Miniconda3\lib\ctypes\__init__.py", line 356, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 126] 找不到指定的模块。
    ----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in C:\Users\xiaos\AppData\Local\Temp\pip-install-73psdp3n\shapely\

1. 解决方法

使用conda,如果没有conda环境建议从这里安装miniconda,选取对应的系统,选择较新的版本。

conda install shapely -y

代码语言:javascript
复制
C:\Users\xiaos>conda install shapely -y
Collecting package metadata (current_repodata.json): done
Solving environment: done

...

...
Downloading and Extracting Packages
mkl-service-2.0.2    | 56 KB     | ############################################################################ | 100%
shapely-1.6.4        | 281 KB    | ############################################################################ | 100%
certifi-2019.6.16    | 156 KB    | ############################################################################ | 100%
conda-4.7.11         | 3.0 MB    | ############################################################################ | 100%
mkl_random-1.0.2     | 272 KB    | ############################################################################ | 100%
numpy-1.16.4         | 48 KB     | ############################################################################ | 100%
numpy-base-1.16.4    | 3.3 MB    | ############################################################################ | 100%
mkl_fft-1.0.14       | 137 KB    | ############################################################################ | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done

Hope this help。。

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 0. 问题描述
  • 1. 解决方法
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档