Does anyone know why the
pip install of
gdal never seems to work? I am asking out of genuine curiosity and don't intend to sound negative. I have a related downstream packaging issue with GDAL as a dependency, but was just wondering why this installation has persisted for such a long time. Because of the
pip errors, I actually have to develop my package for
conda-forge instead of PYPI. My usual workaround for
gdal is to use the
conda-forge installation of
I get all kinds of errors whenever I try and install
gdal. I get different kinds of errors each time I try and install it.
For example, if I use Anaconda to create a new environment:
conda create -n myenv python=3.6 conda activate myenv pip install gdal
I will either get errors about broken
wheels or I get an error such as this about
error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /media/xxx/t_gdal/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv = '"'"'/tmp/xxx/pip-install-bmel7ik_/gdal/setup.py'"'"'; __file__='"'"'/tmp/xxx/pip-install-bmel7ik_/gdal/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/xxx/pip-record-df_uldmb/install-record.txt --single-version-externally-managed --compile --install-headers /media/xxx/anaconda3/envs/t_gdal/include/python3.6m/gdal Check the logs for full command output.
Here are other folks who have had similar issues installing
gdal one of the cases where
pip does not work well, because of all the C and C++ compilation, etc? I was just wondering what the cause was.