geopandas: Impossible to import geopandas (libjson problem)

Hi, I have Ubuntu 18 and I have a libjson dependency problem when I try to use geopandas. How to solve it?

Thank you

!conda install geopandas -c conda-forge
Fetching package metadata .............
Solving package specifications: .

# All requested packages already installed.
# packages in environment at /srv/conda:
#
geopandas                 0.3.0                    py36_0    conda-forge
import geopandas as gpd
---------------------------------------------------------------------------

ImportError                               Traceback (most recent call last)

<ipython-input-16-a62d01c1d62e> in <module>()
----> 1 import geopandas as gpd


/srv/conda/lib/python3.6/site-packages/geopandas/__init__.py in <module>()
      2 from geopandas.geodataframe import GeoDataFrame
      3 
----> 4 from geopandas.io.file import read_file
      5 from geopandas.io.sql import read_postgis
      6 from geopandas.tools import sjoin


/srv/conda/lib/python3.6/site-packages/geopandas/io/file.py in <module>()
      1 import os
      2 
----> 3 import fiona
      4 import numpy as np
      5 


/srv/conda/lib/python3.6/site-packages/fiona/__init__.py in <module>()
     67 from six import string_types
     68 
---> 69 from fiona.collection import Collection, BytesCollection, vsi_path
     70 from fiona._drivers import driver_count, GDALEnv
     71 from fiona.drvsupport import supported_drivers


/srv/conda/lib/python3.6/site-packages/fiona/collection.py in <module>()
      7 
      8 from fiona import compat
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
     10 from fiona.ogrext import Session, WritingSession
     11 from fiona.ogrext import (


ImportError: libjson-c.so.2: cannot open shared object file: No such file or directory

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (8 by maintainers)

Most upvoted comments

Thank you very much @ocefpaf

This is ultimately an issue with gdal getting built with an older, and unpinned, json-c. I removed the new json-c as a workaround and we’ll fix the pinning soon.

Sorry for that.

PS: Ideally try to open conda-forge issues in out feedstocks rather than the upstream source b/c they are 99% of the time related to the packaging and not the Software.