我已经使用Christoph砂轮安装(并卸载)并安装了。但是,当我尝试导入时,我得到:Windows中还有一个GDAL导入错误
Installing collected packages: GDAL
Successfully installed GDAL-2.2.2
(e4) C:\Users\R1702898\Documents\Empirical_v4>python
Python 3.4.4 |Continuum Analytics, Inc.| (default, Jun 15 2016, 15:25:08)
[MSC v.1600 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from osgeo import ogr
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\R1702898\Documents\e4\lib\site-packages\osgeo\__init__.py", line 35, in <module>
_gdal = swig_import_helper()
File "C:\Users\R1702898\Documents\e4\lib\site-packages\osgeo\__init__.py", line 31, in swig_import_helper
_mod = imp.load_module('_gdal', fp, pathname, description)
File "C:\Users\R1702898\Documents\e4\lib\imp.py", line 243, in load_module
return load_dynamic(name, filename, file)
ImportError: DLL load failed with error code -1073741795
在Windows中安装的唯一方法是使用轮子。一切都失败了。唯一可用的轮子用于version 2.2.2
所有其他依赖项:Fiona,六个,numpy,pandas都已安装。尽管geopandas也不会导入(因为它需要ogr)。我还设定了路径。
任何帮助。请。谢谢。
我个人会使用Conda,它解决了这些错误中的大多数。因为GDAL依赖于Numpy,我认为他们需要使用相同的编译器进行编译? –
尝试conda conda-force pip的一切。我认为这是一个调整路径的问题...我会尝试再次卸载一切! –
似乎GDAL 2.2.1与许多其他模块不兼容。我重申这个问题:是否有人知道如何获得较旧的车轮版本?谢谢https://stackoverflow.com/questions/46366884/repository-of-old-versions-of-windows-binary-library-wheels-for-python –