conda-forge / osmnx-feedstock

A conda-smithy repository for osmnx.
BSD 3-Clause "New" or "Revised" License
8 stars 10 forks source link

Python - unable to import gdal #24

Closed Martincccc closed 6 years ago

Martincccc commented 6 years ago

Hi All I am not able to import gdal. I get the following error:

>>> import gdal
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/export/miro/username/anaconda3/lib/python3.6/site-packages/gdal.py", line 2, in <module>
    from osgeo.gdal import deprecation_warn
  File "/export/miro/username/anaconda3/lib/python3.6/site-packages/osgeo/__init__.py", line 21, in <module>
    _gdal = swig_import_helper()
  File "/export/miro/username/anaconda3/lib/python3.6/site-packages/osgeo/__init__.py", line 17, in swig_import_helper
    _mod = imp.load_module('_gdal', fp, pathname, description)
  File "/export/miro/username/anaconda3/lib/python3.6/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/export/miro/username/anaconda3/lib/python3.6/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: libpoppler.so.71: cannot open shared object file: No such file or directory

I installed gdal using:

conda install -c conda-forge gdal 
conda install -c conda-forge/label/broken gdal

below is my configuration.

Python 3.6.3 |Anaconda custom (64-bit)| (default, Oct 13 2017, 12:02:49)
[GCC 7.2.0] on linux

Any ideas how to get this fix ? Thanks.

ocefpaf commented 6 years ago
conda install -c conda-forge/label/broken gdal

Why would you install from a broken label?

Please read https://conda-forge.org/docs/conda-forge_gotchas.html#using-multiple-channels

PS: this works for me,

conda create --name TEST python=3.6 gdal
source activate TEST
python -c 'import gdal;print(dir(gdal))'