conda-forge / geopandas-feedstock

A conda-smithy repository for geopandas.
BSD 3-Clause "New" or "Revised" License
16 stars 14 forks source link

Import error Library not loaded: @rpath/libpoppler.76.dylib #64

Closed palaiya closed 4 years ago

palaiya commented 4 years ago

Issue: After i install earthpy i get the following exception. I tried reinstalling gdal also but didn't work. Moreover, few people suggested to have the packages from same channel and i tried installing all the packages from conda-forge. But still i am not able to resolve the issue. I am working on macMojave (10.14.5) and rest of the details of conda info and list are below.

Traceback (most recent call last):
  File "cloudmask.py", line 4, in <module>
    import earthpy.spatial as es
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/earthpy/spatial.py", line 15, in <module>
    import geopandas as gpd
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/geopandas/__init__.py", line 5, in <module>
    from geopandas.io.file import read_file
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/geopandas/io/file.py", line 4, in <module>
    import fiona
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/__init__.py", line 83, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: dlopen(/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/ogrext.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libpoppler.76.dylib
  Referenced from: /Users/Naresh/anaconda3/lib/libgdal.20.dylib
  Reason: image not found


Environment (conda list):

$ conda list ``` # Name Version Build Channel _ipyw_jlab_nb_ext_conf 0.1.0 py37_0 affine 2.3.0 py_0 conda-forge anaconda-client 1.7.2 py_0 conda-forge anaconda-navigator 1.9.7 py37_0 appnope 0.1.0 py37_1000 conda-forge asn1crypto 0.24.0 py37_1003 conda-forge attrs 19.1.0 py_0 conda-forge backcall 0.1.0 py_0 conda-forge backports 1.0 py_2 conda-forge backports.functools_lru_cache 1.5 py_1 conda-forge backports.tempfile 1.0 py_0 conda-forge backports.weakref 1.0.post1 py37_1000 conda-forge beautifulsoup4 4.8.0 py37_0 conda-forge bleach 3.1.0 py_0 conda-forge boost-cpp 1.70.0 hd59e818_1 conda-forge bzip2 1.0.8 h01d97ff_1 conda-forge ca-certificates 2019.9.11 hecc5488_0 conda-forge cairo 1.16.0 h0ab9d94_1001 conda-forge certifi 2019.9.11 py37_0 conda-forge cffi 1.12.3 py37hccf1714_0 conda-forge chardet 3.0.4 py37_1003 conda-forge click 7.0 py_0 conda-forge click-plugins 1.1.1 py_0 conda-forge cligj 0.5.0 py_0 conda-forge cloudpickle 1.2.2 py_0 conda-forge clyent 1.2.2 py_1 conda-forge conda 4.7.12 py37_0 conda-forge conda-build 3.18.8 py37_0 conda-env 2.6.0 1 conda-package-handling 1.6.0 py37h01d97ff_0 conda-forge conda-verify 3.4.2 py_1 cryptography 2.7 py37h212c5bf_0 conda-forge curl 7.65.3 h22ea746_0 conda-forge cycler 0.10.0 py_1 conda-forge cytoolz 0.10.0 py37h01d97ff_0 conda-forge dask-core 2.4.0 py_0 conda-forge dbus 1.13.6 h2f22bb5_0 conda-forge decorator 4.4.0 py_0 conda-forge defusedxml 0.5.0 py_1 conda-forge earthpy 0.7.4 py_0 conda-forge entrypoints 0.3 py37_1000 conda-forge expat 2.2.6 h0a44026_0 filelock 3.0.10 py_0 conda-forge fiona 1.8.4 py37h9a122fd_0 fontconfig 2.13.1 h1027ab8_1000 conda-forge freetype 2.10.0 h24853df_1 conda-forge freexl 1.0.5 h1de35cc_1002 conda-forge future 0.17.1 py37_1000 conda-forge gdal 2.3.3 py37hbe65578_0 geopandas 0.5.1 py_0 conda-forge geos 3.7.1 h0a44026_1000 conda-forge gettext 0.19.8.1 h46ab8bc_1002 conda-forge giflib 5.1.7 h01d97ff_1 conda-forge glib 2.58.3 h9d45998_1002 conda-forge glob2 0.7 py_0 conda-forge hdf4 4.2.13 hf3c6af0_1002 conda-forge hdf5 1.10.4 nompi_h0cbb7df_1106 conda-forge icu 58.2 h0a44026_1000 conda-forge idna 2.8 py37_1000 conda-forge imageio 2.5.0 py37_0 conda-forge ipykernel 5.1.2 py37h5ca1d4c_0 conda-forge ipython 7.8.0 py37h5ca1d4c_0 conda-forge ipython_genutils 0.2.0 py_1 conda-forge ipywidgets 7.5.1 py_0 conda-forge jedi 0.15.1 py37_0 conda-forge jinja2 2.10.1 py_0 conda-forge jpeg 9c h1de35cc_1001 conda-forge json-c 0.13.1 h1de35cc_1001 conda-forge json5 0.8.5 py_0 conda-forge jsonschema 3.0.2 py37_0 conda-forge jupyter_client 5.3.3 py37_1 conda-forge jupyter_core 4.4.0 py_0 conda-forge jupyterlab 1.1.4 py_0 conda-forge jupyterlab_server 1.0.6 py_0 conda-forge kealib 1.4.10 hecf890f_1003 conda-forge kiwisolver 1.1.0 py37h770b8ee_0 conda-forge krb5 1.16.3 hcfa6398_1001 conda-forge libarchive 3.3.3 h5c473cc_1006 conda-forge libblas 3.8.0 12_openblas conda-forge libcblas 3.8.0 12_openblas conda-forge libcurl 7.65.3 h16faf7d_0 conda-forge libcxx 9.0.0 0 conda-forge libcxxabi 9.0.0 0 conda-forge libdap4 3.19.1 h3d3e54a_0 libedit 3.1.20170329 hcfe32e1_1001 conda-forge libffi 3.2.1 h6de7cb9_1006 conda-forge libgdal 2.3.3 h0950a36_0 libgfortran 3.0.1 0 conda-forge libiconv 1.15 h01d97ff_1005 conda-forge libkml 1.3.0 hed7d534_1010 conda-forge liblapack 3.8.0 12_openblas conda-forge liblief 0.9.0 h2a1bed3_1 conda-forge libnetcdf 4.6.2 h6b88ef6_1001 conda-forge libopenblas 0.3.7 hd44dcd8_1 conda-forge libpng 1.6.37 h2573ce8_0 conda-forge libpq 11.5 h756f0eb_1 conda-forge libsodium 1.0.17 h01d97ff_0 conda-forge libspatialindex 1.9.0 h6de7cb9_1 conda-forge libspatialite 4.3.0a h0cd9627_1026 conda-forge libssh2 1.8.2 hcdc9a53_2 conda-forge libtiff 4.0.10 hd08fb8f_1003 conda-forge libxml2 2.9.9 hd80cff7_2 conda-forge llvm-openmp 9.0.0 h40edb58_0 conda-forge lz4-c 1.8.3 h6de7cb9_1001 conda-forge lzo 2.10 h1de35cc_1000 conda-forge markupsafe 1.1.1 py37h1de35cc_0 conda-forge matplotlib 3.1.1 py37_1 conda-forge matplotlib-base 3.1.1 py37h3a684a6_1 conda-forge mistune 0.8.4 py37h1de35cc_1000 conda-forge munch 2.3.2 py_0 conda-forge navigator-updater 0.2.1 py37_0 nbconvert 5.6.0 py37_1 conda-forge nbformat 4.4.0 py_1 conda-forge ncurses 6.1 h0a44026_1002 conda-forge networkx 2.3 py_0 conda-forge notebook 6.0.1 py37_0 conda-forge numpy 1.17.2 py37h6b0580a_0 conda-forge olefile 0.46 py_0 conda-forge openjpeg 2.3.1 hdc36067_1 conda-forge openssl 1.1.1c h01d97ff_0 conda-forge pandas 0.25.1 py37h86efe34_0 conda-forge pandoc 2.7.3 0 conda-forge pandocfilters 1.4.2 py_1 conda-forge parso 0.5.1 py_0 conda-forge pcre 8.43 h0a44026_0 pexpect 4.7.0 py37_0 conda-forge pickleshare 0.7.5 py37_1000 conda-forge pillow 6.1.0 py37h75ffe9a_1 conda-forge pip 19.2.3 py37_0 conda-forge pixman 0.38.0 h01d97ff_1003 conda-forge pkginfo 1.5.0.1 py_0 conda-forge poppler 0.67.0 hd5eb092_7 conda-forge poppler-data 0.4.9 1 conda-forge postgresql 11.5 h25afefd_1 conda-forge proj4 5.2.0 h6de7cb9_1006 conda-forge prometheus_client 0.7.1 py_0 conda-forge prompt_toolkit 2.0.9 py_0 conda-forge psutil 5.6.3 py37h01d97ff_0 conda-forge ptyprocess 0.6.0 py_1001 conda-forge py-lief 0.9.0 py37h6d6d4d2_1 conda-forge pycosat 0.6.3 py37h1de35cc_1001 conda-forge pycparser 2.19 py37_1 conda-forge pygments 2.4.2 py_0 conda-forge pyopenssl 19.0.0 py37_0 conda-forge pyparsing 2.4.2 py_0 conda-forge pyproj 1.9.6 py37h9c430a6_0 pyqt 5.9.2 py37h2a560b1_4 conda-forge pyrsistent 0.15.4 py37h01d97ff_0 conda-forge pysocks 1.7.1 py37_0 conda-forge python 3.7.3 h93065d6_1 conda-forge python-dateutil 2.8.0 py_0 conda-forge python-libarchive-c 2.8 py37_1004 conda-forge python.app 2 py37_9 pytz 2019.2 py_0 conda-forge pywavelets 1.0.3 py37h1e5eb4f_1 conda-forge pyyaml 5.1.2 py37h01d97ff_0 conda-forge pyzmq 18.1.0 py37hee98d25_0 conda-forge qt 5.9.7 h93ee506_2 conda-forge qtpy 1.9.0 py_0 conda-forge rasterio 1.0.21 py37h9a122fd_0 readline 8.0 hcfe32e1_0 conda-forge requests 2.22.0 py37_1 conda-forge rtree 0.8.3 py37h666c49c_1002 conda-forge ruamel_yaml 0.15.71 py37h1de35cc_1000 conda-forge scikit-image 0.15.0 py37h86efe34_2 conda-forge scipy 1.3.1 py37hab3da7d_2 conda-forge send2trash 1.5.0 py_0 conda-forge setuptools 41.2.0 py37_0 conda-forge shapely 1.6.4 py37h79c6f3e_1005 conda-forge sip 4.19.8 py37h0a44026_1000 conda-forge six 1.12.0 py37_1000 conda-forge snuggs 1.4.7 py_0 conda-forge soupsieve 1.9.3 py37_0 conda-forge sqlite 3.29.0 hb7d70f7_1 conda-forge tbb 2018.0.5 h2d50403_0 conda-forge terminado 0.8.2 py37_0 conda-forge testpath 0.4.2 py_1001 conda-forge tiledb 1.6.2 h4f44bfb_1 conda-forge tk 8.6.9 h2573ce8_1003 conda-forge toolz 0.10.0 py_0 conda-forge tornado 6.0.3 py37h01d97ff_0 conda-forge tqdm 4.36.1 py_0 conda-forge traitlets 4.3.2 py37_1000 conda-forge tzcode 2019a h01d97ff_1002 conda-forge urllib3 1.25.6 py37_0 conda-forge wcwidth 0.1.7 py_1 conda-forge webencodings 0.5.1 py_1 conda-forge wheel 0.33.6 py37_0 conda-forge widgetsnbextension 3.5.1 py37_0 conda-forge xerces-c 3.2.2 h4db8090_1003 conda-forge xz 5.2.4 h1de35cc_1001 conda-forge yaml 0.1.7 h1de35cc_1001 conda-forge zeromq 4.3.2 h6de7cb9_2 conda-forge zlib 1.2.11 h01d97ff_1006 conda-forge zstd 1.4.0 ha9f0a20_0 conda-forge ``` $ conda info ``` active environment : base active env location : /Users/Naresh/anaconda3 shell level : 1 user config file : /Users/Naresh/.condarc populated config files : /Users/Naresh/.condarc conda version : 4.7.12 conda-build version : 3.18.8 python version : 3.7.3.final.0 virtual packages : base environment : /Users/Naresh/anaconda3 (writable) channel URLs : https://conda.anaconda.org/conda-forge/osx-64 https://conda.anaconda.org/conda-forge/noarch https://repo.anaconda.com/pkgs/main/osx-64 https://repo.anaconda.com/pkgs/main/noarch https://repo.anaconda.com/pkgs/r/osx-64 https://repo.anaconda.com/pkgs/r/noarch package cache : /Users/Naresh/anaconda3/pkgs /Users/Naresh/.conda/pkgs envs directories : /Users/Naresh/anaconda3/envs /Users/Naresh/.conda/envs platform : osx-64 user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.3 Darwin/18.6.0 OSX/10.14.5 UID:GID : 501:20 netrc file : /Users/Naresh/.netrc offline mode : False
jorisvandenbossche commented 4 years ago

@palaiya you have a mixture of packages from conda-forge and the default channel: fiona (and libgdal) is coming from defaults, but all other dependencies of libgdal are coming from conda-forge. This mismatch is causing the error you see.

How did you install geopandas or fiona? Which command did you use? (conda-forge is correctly listed as first channel, so that seems good)

ocefpaf commented 4 years ago

How did you install geopandas or fiona? Which command did you use? (conda-forge is correctly listed as first channel, so that seems good)

Also, here is the relevant documentation on how to use conda-forge: https://conda-forge.org/docs/user/introduction.html#how-can-i-install-packages-from-conda-forge

palaiya commented 4 years ago

@jorisvandenbossche I didn't install geopandas or fiona separately. It came with earthpy and that too via different channel as you can see in the sceenshots below.

Part1

So, what did i do wrong here?

Moreover, here is the output of my .condarc

auto_activate_base: false
ssl_verify: true
channels:
  - conda-forge
  - defaults

@ocefpaf As mentioned above my primary channel is conda-forge right? So, packaged should come from conda-forge by default

ocefpaf commented 4 years ago

So, packaged should come from conda-forge by default

B/c you are not using strict as mentioned in our docs. Please see the link I sent you above.

Closing this b/c the problem is not the package but the use of conda/conda-forge.

palaiya commented 4 years ago

@ocefpaf I did put the strict condition as you can see in the screenshot below all the packages are from conda-forge now. But still i am not able to resolve the issue.

part4

Traceback (most recent call last):
  File "cloudmask.py", line 4, in <module>
    import earthpy.spatial as es
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/earthpy/spatial.py", line 15, in <module>
    import geopandas as gpd
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/geopandas/__init__.py", line 5, in <module>
    from geopandas.io.file import read_file
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/geopandas/io/file.py", line 4, in <module>
    import fiona
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/__init__.py", line 83, in <module>
    from fiona.collection import BytesCollection, Collection
  File "/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/collection.py", line 9, in <module>
    from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
ImportError: dlopen(/Users/Naresh/anaconda3/lib/python3.7/site-packages/fiona/ogrext.cpython-37m-darwin.so, 2): Library not loaded: @rpath/libtiff.5.dylib
  Referenced from: /Users/Naresh/anaconda3/lib/libgdal.20.dylib
  Reason: Incompatible library version: libgdal.20.dylib requires version 10.0.0 or later, but libtiff.5.dylib provides version 6.0.0

@ocefpaf Updated my screenshot. Can you see now?

ocefpaf commented 4 years ago

@ocefpaf I did put the strict condition as you can see in the screenshot

I don't see it in your screenshot and it is not in your .condarc.

palaiya commented 4 years ago

@ocefpaf I did put the strict condition as you can see in the screenshot

I don't see it in your screenshot and it is not in your .condarc.

I have updated the screenshot. Apologies in the initial screenshot it was not there. Now the problem is not solved.

FelixLangot commented 2 years ago

Hello all, I ran into a similar issue today. I made a post here:

https://stackoverflow.com/questions/72231927/anaconda-fiona-importerror-library-not-loaded-rpath-libpoppler-91-dylib

@palaiya Did you solve your problem? Thanks

jsta commented 2 years ago

@FelixLangot One thing to try is installing in a fresh environment (not the base conda env). This solved the issue for me.

FelixLangot commented 2 years ago

Hi @jsta, Thanks for your reply. As detailed in my stackoverflow post (Edit 2), I already tried a fresh env with only installing fiona from conda-forge. The installation is successful, but the import in python still does not work.