Unable To Install Pygeoprocessing on Mac

Hello Sir/Ma’am,

I am trying to install pygeoprocessing onto my mac using the following command:

pip3 install pygeoprocessing

I am getting an error which says:

ERROR: Failed building wheel for GDAL
Failed to build GDAL

Then it has a DEPRECATION comment about not being able to build wheels for GDAL which do not use PEP 517. And pip will fall back to legacy ‘setup.py install’ for these.

But then it gives

Running setup.py install for GDAL … error

My python version is 3.7.4. My pip3 version is 20.2.2 from the python3.7 anaconda3 package.

I searched the web for answers but could not find w=anything that made it work.

Any help is appreciated!

Respectfully Yours,
Isita T.

Hello @IsitaT03,

GDAL as a dependency is a little tricky to compile and install, and when we use pip install gdal (which pip tries to do behind the scenes when you use pip install pygeoprocessing), it’ll try to install GDAL from source, which generally leads to the error you mentioned.

Instead, it’ll be easiest if we install GDAL from somwhere else. In this case, it looks like you’re installing pygeoprocessing into a conda environment. If that’s the case, could you try conda install -c conda-forge "gdal>3"? If that succeeds, then you should be able to pip install pygeoprocessing.

Let us know how this goes for you,

1 Like

Hello @jdouglass,

Thank you for your suggestion. I was able to install gdal with brew install gdal and from there installed pygeoprocessing. I am up and running now!

Respectfully Yours,
Isita T.

Great! Glad to hear you were able to get GDAL installed.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.