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?
Add a comment
|
1 Answer
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 (e.g. using
apt-get install libgdal1-dev - check, what version of GDAL is installed
- use
pipto installpygdalwith 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.
2 Comments
MikeJewski
Installing the .whl file seemed to work, and GDAL installed. My problem is now I can't import it. I haven't used python in over a year, and I can't remember if modules need to be in the same path as the script or if they are saved to a central location to be accessed at any time. error
Jan Vlcinsky
@MikeJewski I guess that installing by wheel installs the package but is expecting some libraries in system and as they are missing the import fails. Just follow the instructions and you shall succeed.