ImportError:libkea.so.1.4.7:无法打开共享库文件:没有这样的文件或目录

时间:2019-01-17 16:48:04

标签: python conda osmnx

我正在使用以下链接安装软件包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但是,对我来说,要了解这是不容易的。有人可以帮我吗?

1 个答案:

答案 0 :(得分:1)

根据OSMnx documentation:“如果您对安装有任何问题,请尝试使用conda和conda-forge在新的干净虚拟环境中安装OSMnx”:

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

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