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