简体   繁体   English

尝试在Windows 7 64位(Python 3.4.4 32位)上使用GDAL时出现“ ImportError:DLL加载失败”

[英]“ImportError: DLL load failed” when trying to use GDAL on Windows 7 64bit (Python 3.4.4 32bit)

What I would like to do 我想做什么

Installing GDAL on Windows7 64bit 在Windows7 64位上安装GDAL

Precondition 前提

As for environment variables, I set the following three settings: 至于环境变量,我设置了以下三个设置:

  • PATH 路径
  • GDAL_DATA GDAL_DATA
  • GDAL_DRIVER_PATH GDAL_DRIVER_PATH

Error message 错误信息

=========== RESTART: C:\Users\XXXX\Desktop\sample_program\sample.py ===========
 Traceback (most recent call last):
 File "C:\Users\XXXX\Desktop\sample_program\sample.py", line 2, in <module>
 from osgeo import gdal, gdalconst
 File "C:\Python34_32bit\lib\site-packages\osgeo\init.py", line 21, in <module>
 _gdal = swig_import_helper()
 File "C:\Python34_32bit\lib\site-packages\osgeo\init.py", line 17, in swig_import_helper
 _mod = imp.load_module('_gdal', fp, pathname, description)
 File "C:\Python34_32bit\lib\imp.py", line 243, in load_module
 return load_dynamic(name, filename, file)
 ImportError: DLL load failed: The specified procedure can not be found

I solved my problem. 我解决了我的问题。 GDAL does not work because GDAL refers dll file which other software made before.(The dll file other software made is same name as GDAL's dll). GDAL不起作用,因为GDAL引用了以前其他软件制作的dll文件。(其他软件制作的dll文件与GDAL的dll同名)。 So, I fixed the dll path appropriately.Thanks. 因此,我适当地修复了dll路径。谢谢。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Windows 64位Ctypes模块上的Python 32位模块错误 - Python 32bit on Windows 64bit Ctypes module error 如何在 anaconda 64bit 旁边安装 python 32bit - How to install python 32bit alongside anaconda 64bit 64位Python可以连接32位MS访问驱动程序吗? - Possible for 64bit Python to connect with 32bit MS access driver? 将python的默认版本从32位更改为64位 - Change default version of python from 32bit to 64bit 使用多个 Python 引擎(32Bit/64bit 和 2.7/3.5) - Using multiple Python engines (32Bit/64bit and 2.7/3.5) 在执行中从64位python.exe切换到32位 - Switching from 64bit python.exe to 32bit in mid execution 如何在 Python 更改 32 位 - &gt; 64 位后让 Jupyter 工作 - How to get Jupyter working after Python change 32bit -> 64bit 如何为 windows 7 32 位系统安装 tensorflow?我在我的系统中安装了 python 3.5(32 位)并安装了 anaconda 3.4.4(32 位) - how to install tensorflow for windows 7 32bit system?i installed python 3.5(32 bit) into my system and also installed anaconda 3.4.4(32 bit) 我们可以将 python 32 位用于 Microsoft 视觉代码 64 位吗? - Can we use python 32 bit for Microsoft visual code 64bit? 适用于Windows的Theano安装,Python 3,64位 - Theano installation for Windows, Python 3, 64bit
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM