how to install gdal

Hello,

I have some doubt before processing the installation of GDAL on my MacOSX.

I have a macbook pro with Ventura 13.0.1


I need to install GDAL and I found that tutorial


I do not underdtand why he need to install with brew and then with pip (I will do with pip3).

My second question, why should he need to to download gdal?

pip3 install gdal

Is it not enough?


But my first question come back. Why I would need to install with brew, and then download with pip3 download gdal, and install with python3, instead of pip3 install gdal?


Many thanks for your clarification



MacBook Pro

Posted on Dec 30, 2022 2:04 AM

Reply
Question marked as Top-ranking reply

Posted on Dec 30, 2022 5:52 AM

The library isn’t pure python. You need to install the GDAL libraries to use them with the GDAL package in pypi.

pip should be aliased to pip3.


There are conda packages that build the libraries, so I would use those instead of homebrew if you already use a conda environment.


See here: https://pypi.org/project/GDAL/

5 replies
Question marked as Top-ranking reply

Dec 30, 2022 5:52 AM in response to pierrot-la-lune

The library isn’t pure python. You need to install the GDAL libraries to use them with the GDAL package in pypi.

pip should be aliased to pip3.


There are conda packages that build the libraries, so I would use those instead of homebrew if you already use a conda environment.


See here: https://pypi.org/project/GDAL/

Dec 30, 2022 4:29 AM in response to pierrot-la-lune

No problem; I understand. It doesn't change the answer though. I am somewhat familiar with homebrew but have literally no knowledge about either Pip3 or Gdal. Although you may be lucky enough to find someone on this site who does, you are far more likely to find help on a site or user support forum dedicated to those products.


As for my limited knowledge of homebrew: Certain minor things have changed in macOS "Ventura". You need to begin with updating XCode and installing its command line tools, but this is so fundamental and basic it isn't likely to help at you all with Pip3 or Gdal.

Dec 30, 2022 5:30 AM in response to pierrot-la-lune

pierrot-la-lune wrote:

I do not underdtand why he need to install with brew and then with pip (I will do with pip3).

You would have to ask the author of that article. No one here can speak for them.


I can tell you that Homebrew is very popular. I frequently see posts from people who have totally scrambled their system by installing Homebrew.


Otherwise, it is normal to have to install Python modules separately. People love Python. But unfortunately, virtually no one understands how to install Python on a Mac.

My second question, why should he need to to download gdal?
pip3 install gdal
Is it not enough?

Again, you would have to ask the author. This forum is not a place to go for information about Homebrew or Python. I can tell you that I avoid both.

But my first question come back. Why I would need to install with brew, and then download with pip3 download gdal, and install with python3, instead of pip3 install gdal?

No clue. I have my own method for building GDAL on a Mac, or for an iPhone. My ultimate goal is to make GDAL functionality available for people who don’t want to install Homebrew or Python, or have an iPhone. Hopefully it will be available in a few months.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to install gdal

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.