【问题标题】:Why I'm getting this error? What can be done to install osmnx on windows 10?为什么我会收到此错误?在 Windows 10 上安装 osmnx 可以做些什么?
【发布时间】:2019-12-23 10:31:25
【问题描述】:

我无法在 jupyter notebook 中安装 osmnx。 shapely 1.6 版出现以下问题

我可以安装 shapely 1.4 但 osmnx 需要 1.6 版本

我使用的命令是 !pip install osmnx

收集Shapely>=1.6(来自osmnx) 使用缓存的https://files.pythonhosted.org/packages/a2/fb/7a7af9ef7a35d16fa23b127abee272cfc483ca89029b73e92e93cdf36e6b/Shapely-1.6.4.post2.tar.gz

ERROR: Command errored out with exit status 1:
 command: 'c:\users\shrinath\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Shrinath\\AppData\\Local\\Temp\\pip-install-3_oopeoz\\Shapely\\setup.py'"'"'; __file__='"'"'C:\\Users\\Shrinath\\AppData\\Local\\Temp\\pip-install-3_oopeoz\\Shapely\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
     cwd: C:\Users\Shrinath\AppData\Local\Temp\pip-install-3_oopeoz\Shapely\
Complete output (9 lines):
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Shrinath\AppData\Local\Temp\pip-install-3_oopeoz\Shapely\setup.py", line 80, in <module>
    from shapely._buildcfg import geos_version_string, geos_version, \
  File "C:\Users\Shrinath\AppData\Local\Temp\pip-install-3_oopeoz\Shapely\shapely\_buildcfg.py", line 200, in <module>
    lgeos = CDLL("geos_c.dll")
  File "c:\users\shrinath\anaconda3\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 126] The specified module could not be found
----------------------------------------

错误:命令出错,退出状态为 1:python setup.py egg_info 检查日志以获取完整的命令输出。

【问题讨论】:

标签: python python-3.x jupyter-notebook shapely osmnx


【解决方案1】:

您是否按照OSMnx documentation 中的安装说明进行操作?它建议仅当您的系统上已经安装了所有 OSMnx 依赖项时才使用 pip(因为其中一些很棘手)。从上面的链接:“如果您在安装时遇到任何问题,请尝试使用 conda-forge 和严格的通道优先级在新的、干净的 conda 环境中安装 OSMnx。”这应该会为您解决问题。

【讨论】:

    猜你喜欢
    • 2011-04-30
    • 2018-06-22
    • 2016-01-01
    • 2021-12-09
    • 2012-02-19
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多