简体   繁体   中英

Having troubles installing GDAL for Python

I am still pretty new to python, and I was wondering if anyone has had this problem before. I have read other threads, but I haven't seen this problem addressed yet. I need to install the GDAL module for python, and I have seen threads saying you need to install GDAL first and then it can be used on python, but I have also see others that said that conda install GDAL is enough. When I try the latter, I get this error . Any ideas?

I had the same problem two days ago trying to install GDAL on Debian Jessie.

The solution was using pygdal python package from PyPi.

Just read the instructions at PyPi and follow them , they are a bit different then one expects. In general:

  • install required dependencies into your system (eg using apt-get install libgdal1-dev
  • check, what version of GDAL is installed
  • use pip to install pygdal with a version matching the installed GDAL lib.

The last step is a bit unusual, but does the trick.

This works for Linux. For Windows my colleagues claim, there are ready made binaries, which can be installed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM