0

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?

1 Answer 1

1

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 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.

Sign up to request clarification or add additional context in comments.

2 Comments

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
@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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.