Skip to content

ImportError: DLL load failed #175

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kikocorreoso opened this issue Aug 31, 2017 · 6 comments
Closed

ImportError: DLL load failed #175

kikocorreoso opened this issue Aug 31, 2017 · 6 comments

Comments

@kikocorreoso
Copy link

Hi all,

I'm having problems installing gdal on a W7 32 bits box.

Python 3.6.1 | packaged by conda-forge | (default, May 23 2017, 14:20:21) [MSC v.1900 32 bit (Intel)]

When I try to import it:

from osgeo import gdal

I get the following ImportError:

ImportError                               Traceback (most recent call last)
<ipython-input-1-a04b80bf4e65> in <module>()
----> 1 from osgeo import gdal

~\AppData\Local\Continuum\Miniconda3\lib\site-packages\osgeo\__init__.py in <module>()
     23                 fp.close()
     24             return _mod
---> 25     _gdal = swig_import_helper()
     26     del swig_import_helper
     27 else:

~\AppData\Local\Continuum\Miniconda3\lib\site-packages\osgeo\__init__.py in swig_import_helper()
     19         if fp is not None:
     20             try:
---> 21                 _mod = imp.load_module('_gdal', fp, pathname, descriptio
n)
     22             finally:
     23                 fp.close()

~\AppData\Local\Continuum\Miniconda3\lib\imp.py in load_module(name, file, filename, details)
    240                 return load_dynamic(name, filename, opened_file)
    241         else:
--> 242             return load_dynamic(name, filename, file)
    243     elif type_ == PKG_DIRECTORY:
    244         return load_package(name, filename)

~\AppData\Local\Continuum\Miniconda3\lib\imp.py in load_dynamic(name, path, file)
    340         spec = importlib.machinery.ModuleSpec(
    341             name=name, loader=loader, origin=path)
--> 342         return _load(spec)
    343
    344 else:

ImportError: DLL load failed: No se puede encontrar el módulo especificado.

Thanks for the hard work.

@kmuehlbauer
Copy link
Contributor

kmuehlbauer commented Aug 31, 2017

@kikocorreoso

Please use a dedicated environment, eg:

> conda create -n GDAL python=3.6 gdal
> activate GDAL

If this doesn't help, please post the output of

> conda list

and

> conda config --show

@kikocorreoso
Copy link
Author

kikocorreoso commented Aug 31, 2017

It works like a charm in its own environment.

Is there any compatibility problem or conflict with preinstalled libs if I try to install it in the root?

Thanks again.

@kmuehlbauer
Copy link
Contributor

@kikocorreoso

Glad it worked!

Installing in root environment is not recommended due to possible clash with defaults-packages. @ocefpaf surely has a more in-depth answer for you.

@kikocorreoso
Copy link
Author

Thanks again for your time and explanation.

@ocefpaf
Copy link
Member

ocefpaf commented Aug 31, 2017

Is there any compatibility problem or conflict with preinstalled libs if I try to install it in the root?

Yep. That is pretty much it 😄

Take a look at the docs on the matter and let us know if it is clear enough. (This problem is so common that we could use a review, and maybe rewrite, of the docs.)

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

@kikocorreoso
Copy link
Author

kikocorreoso commented Aug 31, 2017

Thanks again for your time and explanation.

x2 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants