I am having the same issue. Starting python from the command prompt/IDLE
lets me do 'from osgeo import gdal, osr, ogr', but running the same in
Spyder results in:
"Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 21, in
<module>
_gdal = swig_import_helper()
File "C:\Python27\lib\site-packages\osgeo\__init__.py", line 17, in
swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
ImportError: DLL load failed: The specified module could not be found."
I looked at the output of sys.path in both, and the only difference is
that 'C:\\Python27\\lib\\site-packages\\spyderlib\\utils\\external' appears
immediately after '' in the path listing, and not in the sys.path output
from the command prompt.
I installed Spyder via Python(x,y), and installed GDAL/Python bindings from
two .msi files (not from source, second file for the python bindings).
Since GDAL works fine from the default prompt I assume it is installed
correctly.
Any ideas?
On Thursday, October 16, 2014 11:25:00 PM UTC+2, Adrian Klaver wrote:
>
> On 10/16/2014 03:56 AM, Oliver wrote:
> > I am using 32-bit Python 2.7 with gdal binaries 1.11 on windows 7. The
> > "*import gda*l" command works well in the default python console but in
> > the spyder python shell the command gives an import error: DLL load
> > failed: procedure not found. I added all kind of paths to the gdal libs
> > with the PYTHONPATH manager without success.
> > Can anyone give me a hint?
>
> How did you install Spyder?
>
> Is it part of the same package that installed Python?
>
> What does sys.path show in the default console versus the Spyder console?
>
>
>
> --
> Adrian Klaver
> [email protected] <javascript:>
>
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib.
For more options, visit https://groups.google.com/d/optout.