fiona 1.7.11 causes ImportError when trying any example with geopandas
See original GitHub issueI created a virtual environment named geoviews-env
(I use Miniconda) and installed a few things:
conda create -n geoviews-env python=3.6 -y
source activate geoviews-env
conda install -c conda-forge -c ioam holoviews geoviews -y
conda install xarray -y
conda install -c conda-forge iris -y
conda install -c conda-forge geopandas -y
If I now run the following:
python -c 'import geopandas as gpd;print(gpd.__version__)'
I get this error:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/jack/miniconda3/envs/geoviews-env/lib/python3.6/site-packages/geopandas/__init__.py", line 4, in <module>
from geopandas.io.file import read_file
File "/home/jack/miniconda3/envs/geoviews-env/lib/python3.6/site-packages/geopandas/io/file.py", line 3, in <module>
import fiona
File "/home/jack/miniconda3/envs/geoviews-env/lib/python3.6/site-packages/fiona/__init__.py", line 69, in <module>
from fiona.collection import Collection, BytesCollection, vsi_path
File "/home/jack/miniconda3/envs/geoviews-env/lib/python3.6/site-packages/fiona/collection.py", line 9, in <module>
from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: /home/jack/miniconda3/envs/geoviews-env/lib/python3.6/site-packages/fiona/../../../libgdal.so.20: undefined symbol: _ZN11xercesc_3_211InputSource11setEncodingEPKDs
I thought it was a problem in Fiona, so I tried to downgrade poppler to 0.52
as suggested here. That didn’t work for me.
Here is the output of conda list
:
asn1crypto 0.24.0 py36_0 conda-forge
backcall 0.1.0 py_0 conda-forge
bleach 2.1.3 py_0 conda-forge
bokeh 0.12.15 py36_0 conda-forge
boost 1.66.0 py36_1 conda-forge
boost-cpp 1.66.0 1 conda-forge
bzip2 1.0.6 1 conda-forge
ca-certificates 2018.03.07 0
cairo 1.14.12 h77bcde2_0
cartopy 0.16.0 py36_0 conda-forge
certifi 2018.4.16 py36_0
cf_units 1.2.0 py36_0 conda-forge
cffi 1.11.5 py36_0 conda-forge
chardet 3.0.4 py36_0 conda-forge
click 6.7 py_1 conda-forge
click-plugins 1.0.3 py36_0 conda-forge
cligj 0.4.0 py36_0 conda-forge
cloudpickle 0.5.2 py_0 conda-forge
cryptography 2.2.1 py36_0 conda-forge
curl 7.59.0 1 conda-forge
cycler 0.10.0 py36_0 conda-forge
cytoolz 0.9.0.1 py36_0 conda-forge
dask 0.17.3 py_0 conda-forge
dask-core 0.17.3 py_0 conda-forge
dbus 1.11.0 0 conda-forge
decorator 4.3.0 py_0 conda-forge
descartes 1.1.0 py_1 conda-forge
distributed 1.21.7 py36_0 conda-forge
entrypoints 0.2.3 py36_1 conda-forge
expat 2.2.5 0 conda-forge
fiona 1.7.11 py36_3 conda-forge
fontconfig 2.13.0 0 conda-forge
freetype 2.8.1 0 conda-forge
freexl 1.0.5 0 conda-forge
gdal 2.2.2 py36hc209d97_1
geopandas 0.3.0 py36_0 conda-forge
geos 3.6.2 1 conda-forge
geoviews 1.4.3 py_0 conda-forge
giflib 5.1.4 0 conda-forge
glib 2.53.6 h5d9569c_2
gmp 6.1.2 0 conda-forge
gst-plugins-base 1.12.4 h33fb286_0
gstreamer 1.12.4 hb53b477_0
hdf4 4.2.13 0 conda-forge
hdf5 1.10.1 2 conda-forge
heapdict 1.0.0 py36_0 conda-forge
holoviews 1.10.2 py_0 conda-forge
html5lib 1.0.1 py_0 conda-forge
icu 58.2 0 conda-forge
idna 2.6 py36_1 conda-forge
intel-openmp 2018.0.0 8
ipykernel 4.8.2 py36_0 conda-forge
ipython 6.3.1 py36_0 conda-forge
ipython_genutils 0.2.0 py36_0 conda-forge
ipywidgets 7.2.1 py36_1 conda-forge
iris 2.0.0 py36_1 conda-forge
jedi 0.12.0 py36_0 conda-forge
jinja2 2.10 py36_0 conda-forge
jpeg 9b 2 conda-forge
json-c 0.12.1 0 conda-forge
jsonschema 2.6.0 py36_1 conda-forge
jupyter 1.0.0 py_1 conda-forge
jupyter_client 5.2.3 py36_0 conda-forge
jupyter_console 5.2.0 py36_0 conda-forge
jupyter_core 4.4.0 py_0 conda-forge
kealib 1.4.7 4 conda-forge
kiwisolver 1.0.1 py36_1 conda-forge
krb5 1.14.6 0 conda-forge
libdap4 3.19.2 1 conda-forge
libedit 3.1 heed3624_0
libffi 3.2.1 hd88cf55_4
libgcc 7.2.0 h69d50b8_2
libgcc-ng 7.2.0 hdf63c60_3
libgdal 2.2.2 h804cdde_1
libgfortran 3.0.0 1
libgfortran-ng 7.2.0 hdf63c60_3
libiconv 1.15 0 conda-forge
libkml 1.3.0 6 conda-forge
libnetcdf 4.4.1.1 10 conda-forge
libpng 1.6.34 0 conda-forge
libpq 9.6.6 h4e02ad2_0
libsodium 1.0.16 0 conda-forge
libspatialindex 1.8.5 1 conda-forge
libspatialite 4.3.0a h72746d6_18
libssh2 1.8.0 2 conda-forge
libstdcxx-ng 7.2.0 hdf63c60_3
libtiff 4.0.9 0 conda-forge
libuuid 1.0.3 1 conda-forge
libxcb 1.13 0 conda-forge
libxml2 2.9.8 0 conda-forge
libxslt 1.1.32 0 conda-forge
locket 0.2.0 py36_1 conda-forge
lxml 4.2.1 py36_0 conda-forge
markupsafe 1.0 py36_0 conda-forge
matplotlib 2.2.2 py36_1 conda-forge
mistune 0.8.3 py36_1 conda-forge
mkl 2018.0.2 1
mkl_fft 1.0.2 py36_0 conda-forge
mkl_random 1.0.1 py36_0 conda-forge
msgpack-python 0.5.6 py36_0 conda-forge
munch 2.3.1 py_0 conda-forge
nbconvert 5.3.1 py_1 conda-forge
nbformat 4.4.0 py36_0 conda-forge
ncurses 6.0 h9df7e31_2
netcdf4 1.3.1 py36_1 conda-forge
notebook 5.4.1 py36_0 conda-forge
numpy 1.14.2 py36hdbf6ddf_1
olefile 0.45.1 py36_0 conda-forge
openjpeg 2.3.0 2 conda-forge
openssl 1.0.2o h20670df_0
owslib 0.16.0 py_0 conda-forge
packaging 17.1 py_0 conda-forge
pandas 0.22.0 py36hf484d3e_0
pandoc 2.2 0 conda-forge
pandocfilters 1.4.2 py36_0 conda-forge
param 1.6.1 py_0 conda-forge
parso 0.2.0 py_0 conda-forge
partd 0.3.8 py36_0 conda-forge
pcre 8.41 1 conda-forge
pexpect 4.5.0 py36_0 conda-forge
pickleshare 0.7.4 py36_0 conda-forge
pillow 5.1.0 py36_0 conda-forge
pip 10.0.1 py36_0
pixman 0.34.0 1 conda-forge
poppler 0.60.1 hc909a00_0
poppler-data 0.4.9 0 conda-forge
proj4 4.9.3 5 conda-forge
prompt_toolkit 1.0.15 py36_0 conda-forge
psutil 5.4.5 py36_0 conda-forge
psycopg2 2.7.4 py36_0 conda-forge
ptyprocess 0.5.2 py36_0 conda-forge
pycparser 2.18 py36_0 conda-forge
pyepsg 0.3.2 py36_0 conda-forge
pygments 2.2.0 py36_0 conda-forge
pyke 1.1.1 py36_0 conda-forge
pyopenssl 17.5.0 py36_1 conda-forge
pyparsing 2.2.0 py36_0 conda-forge
pyproj 1.9.5.1 py36_0 conda-forge
pyqt 5.6.0 py36_5 conda-forge
pysal 1.14.3 py36_0 conda-forge
pyshp 1.2.12 py_0 conda-forge
pysocks 1.6.8 py36_1 conda-forge
python 3.6.5 hc3d631a_2
python-dateutil 2.7.2 py_0 conda-forge
pytz 2018.4 py_0 conda-forge
pyyaml 3.12 py36_1 conda-forge
pyzmq 17.0.0 py36_4 conda-forge
qt 5.6.2 h974d657_12
qtconsole 4.3.1 py36_0 conda-forge
readline 7.0 ha6073c6_4
requests 2.18.4 py36_1 conda-forge
rtree 0.8.3 py36_0 conda-forge
scipy 1.0.1 py36hfc37229_0
send2trash 1.5.0 py_0 conda-forge
setuptools 39.1.0 py36_0
shapely 1.6.4 py36_0 conda-forge
simplegeneric 0.8.1 py36_0 conda-forge
sip 4.18 py36_1 conda-forge
six 1.11.0 py36_1 conda-forge
sortedcontainers 1.5.10 py36_0 conda-forge
sqlalchemy 1.2.7 py36h65ede16_0 conda-forge
sqlite 3.23.1 he433501_0
tblib 1.3.2 py36_0 conda-forge
terminado 0.8.1 py36_0 conda-forge
testpath 0.3.1 py36_0 conda-forge
tk 8.6.7 hc745277_3
toolz 0.9.0 py_0 conda-forge
tornado 5.0.2 py36_0 conda-forge
traitlets 4.3.2 py36_0 conda-forge
udunits2 2.2.26 0 conda-forge
urllib3 1.22 py36_0 conda-forge
util-linux 2.21 0
wcwidth 0.1.7 py36_0 conda-forge
webencodings 0.5 py36_0 conda-forge
wheel 0.31.0 py36_0
widgetsnbextension 3.2.1 py36_0 conda-forge
xarray 0.10.3 py36_0
xerces-c 3.2.1 0 conda-forge
xorg-libxau 1.0.8 3 conda-forge
xorg-libxdmcp 1.1.2 3 conda-forge
xz 5.2.3 h5e939de_4
yaml 0.1.7 0 conda-forge
zeromq 4.2.5 1 conda-forge
zict 0.1.3 py_0 conda-forge
zlib 1.2.11 ha838bed_2
I created another virtual environment to see if the issue was reproducible with geopandas.
conda create -n geopandas-env python=3.6
source activate geopandas-env
conda install -c conda-forge geopandas -y
This time I can import geopandas:
python -c 'import geopandas as gpd;print(gpd.__version__)'
0.3.0+60.gce8f70c
Here is the output of conda list
for the geopandas-env
environment:
blas 1.1 openblas conda-forge
bzip2 1.0.6 h9a117a8_4
ca-certificates 2017.08.26 h1d4fec5_0
cairo 1.14.12 h77bcde2_0
certifi 2018.1.18 py36_0
click 6.7 py36h5253387_0
click-plugins 1.0.3 py36_0
cligj 0.4.0 py36_0
curl 7.58.0 h84994c4_0
cycler 0.10.0 py36h93f1223_0
dbus 1.12.2 hc3f9b76_1
descartes 1.1.0 py36h2f9c1c0_0
expat 2.2.5 he0dffb1_0
fiona 1.7.10 py36h48a52f0_0
fontconfig 2.12.6 h49f89f6_0
freetype 2.8 hab7d2ae_1
freexl 1.0.5 h14c3975_0
gdal 2.2.2 py36hc209d97_1
geopandas 0.3.0 py36h2f9c1c0_0
geos 3.6.2 heeff764_2
giflib 5.1.4 h26a3ec6_1
glib 2.53.6 h5d9569c_2
gst-plugins-base 1.12.4 h33fb286_0
gstreamer 1.12.4 hb53b477_0
hdf4 4.2.13 h3ca952b_2
hdf5 1.10.1 h9caa474_1
icu 58.2 h9c2bf20_1
intel-openmp 2018.0.0 8
jpeg 9b h024ee3a_2
json-c 0.12.1 ha6a3662_2
kealib 1.4.7 h79811e5_5
kiwisolver 1.0.1 py36h764f252_0
krb5 1.14.2 hcdc1b81_6
libboost 1.65.1 habcd387_4
libcurl 7.58.0 h1ad7b7a_0
libdap4 3.19.0 h5bd89bb_2
libedit 3.1 heed3624_0
libffi 3.2.1 hd88cf55_4
libgcc-ng 7.2.0 hdf63c60_3
libgdal 2.2.2 h804cdde_1
libgfortran 3.0.0 1
libgfortran-ng 7.2.0 hdf63c60_3
libkml 1.3.0 h9d32c78_3
libnetcdf 4.4.1.1 h816af47_8
libpng 1.6.34 hb9fc6fc_0
libpq 9.6.6 h4e02ad2_0
libspatialindex 1.8.5 h20b78c2_2
libspatialite 4.3.0a h72746d6_18
libssh2 1.8.0 h9cfc8f7_4
libstdcxx-ng 7.2.0 hdf63c60_3
libtiff 4.0.9 h28f6b97_0
libuuid 1.0.3 h1bed415_2
libxcb 1.12 hcd93eb1_4
libxml2 2.9.7 h26e45fe_0
matplotlib 2.2.2 py36h0e671d2_0
mkl 2018.0.2 1
munch 2.2.0 py36_0
ncurses 6.0 h9df7e31_2
numpy 1.14.3 py36_blas_openblas_200 [blas_openblas] conda-forge
openblas 0.2.20 7 conda-forge
openjpeg 2.2.0 h622c3cc_2
openssl 1.0.2n hb7f436b_0
pandas 0.22.0 py36hf484d3e_0
pcre 8.41 hc27e229_1
pip 9.0.1 py36_5
pixman 0.34.0 hceecf20_3
poppler 0.60.1 hc909a00_0
poppler-data 0.4.8 hf2eda46_0
proj4 4.9.3 hc8507d1_7
psycopg2 2.7.4 py36hb7f436b_0
pyparsing 2.2.0 py36hee85983_1
pyproj 1.9.5.1 py36_0
pyqt 5.6.0 py36h0386399_5
pysal 1.14.3 py36_0
python 3.6.4 hc3d631a_3
python-dateutil 2.7.0 py36_0
pytz 2018.3 py36_0
qt 5.6.2 hd25b39d_14
readline 7.0 ha6073c6_4
rtree 0.8.3 py36h2f9c1c0_0
scipy 1.0.1 py36_blas_openblas_200 [blas_openblas] conda-forge
setuptools 38.5.1 py36_0
shapely 1.6.4 py36h0c48222_0
sip 4.18.1 py36h51ed4ed_2
six 1.11.0 py36h372c433_1
sqlalchemy 1.2.5 py36h14c3975_0
sqlite 3.22.0 h1bed415_0
tk 8.6.7 hc745277_3
tornado 5.0 py36_0
wheel 0.30.0 py36hfd4bba0_1
xerces-c 3.2.1 hac72e42_0
xz 5.2.3 h55aa19d_2
zlib 1.2.11 ha838bed_2
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
IPython on Windows fails to import geopandas - Stack Overflow
ImportError : DLL load failed: The specified procedure could not be found. error when trying to import geopandas in python 3.6.
Read more >Fiona import error when updated to version 1.7
When updating with conda, this updates fiona to version 1.7. Now I get an error trying to import fiona . ImportError: dlopen(/Users/phil/ ...
Read more >Fiona - PyPI
Here is an example of using Fiona to read some records from one data file, change their geometry attributes, and write them to...
Read more >Fiona Documentation - Read the Docs
Here is an example of using Fiona to read some records from one data file, change their geometry attributes, and write them to...
Read more >Fiona not working from ArcPro - Esri Community
When I try to import it I get an import error. This error is being discussed on gis.stackexchange here. Their workaround was to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m not an expert on this, but I’m not sure there’s much you can do as the geoviews maintainer, except ask people to be sure not to mix competing channels (defaults and conda-forge in this case).
Above, in the first environment you can see that gdal is from defaults, while geopandas and fiona are from conda-forge. Presumably something like
conda install -c conda-forge gdal
would fix the problem? Or aconda install conda-forge::gdal
kind of a thing to make sure gdal keeps coming from conda-forge in the future.In the second environment, those packages are all from defaults. Though I see scipy, numpy, etc from conda-forge, and that’s another invitation for binary incompatibilities to show up…
I sympathize with the user perspective, though, because it’s very easy to mix channels even if you are trying not to.
Thanks for reporting this, I’ll try to pin this appropriately in the next release.