1

我正在通过以下链接安装包 OSMnx:https ://geoffboeing.com/2016/11/osmnx-python-street-networks/在 Linux 上使用 conda install -c conda-forge osmnx.
它有效,但有这样的警告:

==> WARNING: A newer version of conda exists. <==
  current version: 4.5.11
  latest version: 4.5.12

Please update conda by running

    $ conda update -n base -c defaults conda

所以我更新了 conda,并在我的电脑上重新安装了 OSMnx 包。之后,我启动我的 Python shell 并进入import osmnx测试它。然后我收到以下错误。

Python 3.7.1 | packaged by conda-forge | (default, Nov 13 2018, 18:33:04) 
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import osmnx
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/devel/anaconda3/lib/python3.7/site-packages/osmnx/__init__.py", line 9, in <module>
    from .buildings import *
  File "/home/devel/anaconda3/lib/python3.7/site-packages/osmnx/buildings.py", line 9, in <module>
    import geopandas as gpd
  File "/home/devel/anaconda3/lib/python3.7/site-packages/geopandas/__init__.py", line 4, in <module>
    from geopandas.io.file import read_file
  File "/home/devel/anaconda3/lib/python3.7/site-packages/geopandas/io/file.py", line 3, in <module>
    import fiona
  File "/home/devel/anaconda3/lib/python3.7/site-packages/fiona/__init__.py", line 83, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/home/devel/anaconda3/lib/python3.7/site-packages/fiona/collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: libkea.so.1.4.7: cannot open shared object file: No such file or directory

经过搜索,我找到了这个链接:https ://github.com/darribas/contextily/issues/42但是我并不容易理解发生了什么。有人可以帮我吗?

4

1 回答 1

3

根据OSMnx 文档:“如果您在安装时遇到任何问题,请尝试使用 conda 和 conda-forge 在新的、干净的虚拟环境中安装 OSMnx”:

conda create --override-channels -c conda-forge -n OSMNX python=3 osmnx

这应该可以解决 Fiona(依赖项)安装/路径问题。

于 2019-01-23T18:17:39.343 回答