<div dir="ltr">I changed the Dockerfile following the same steps as the author of this post (<a href="https://github.com/OSGeo/gdal/issues/4467" target="_blank">https://github.com/OSGeo/gdal/issues/4467</a>) did to install GDAL (but using version 2.2.3) and it worked fine. Still don't know why the way I did previously is not working anymore but now everything is ok. Thank you!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em seg., 27 de set. de 2021 às 11:38, Matheus Cammarosano Hidalgo <<a href="mailto:matheuschidalgo@gmail.com">matheuschidalgo@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">The proposed solution applies to GDAL 3.0.4 going forward and I am working with 2.2.3. It is weird because I haven't changed anything in my Dockerfile...</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qui., 23 de set. de 2021 às 13:56, Even Rouault <<a href="mailto:even.rouault@spatialys.com" target="_blank">even.rouault@spatialys.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<p>Perhaps related to <a href="https://github.com/OSGeo/gdal/issues/4467" target="_blank">https://github.com/OSGeo/gdal/issues/4467</a> ?
where upgrading setuptools was suggested<br>
</p>
<div>Le 23/09/2021 à 18:40, Matheus
Cammarosano Hidalgo a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">I made a Dockerfile two years ago with a GDAL 2.2.3
install that was working fine ultil three weeks ago, when I made
a change in my Python code (not Dockerfile), but when I tried to
build the image I got an error installing GDAL.
<div>I am using a python:3.7 default image from Docker and I
have the following lines to install GDAL:<br>
<div>
<div><span># Install GDAL dependencies</span></div>
<div><span>RUN</span> apt-get install -y python3-pip
libgdal-dev locales</div>
<br>
<div><span># Ensure locales configured correctly</span></div>
<div><span>RUN</span> locale-gen en_US.UTF-8</div>
<div><span>ENV</span> <span>LC_ALL</span>=<span>'en_US.utf8'</span></div>
<br>
<div><span># Set python aliases for python3</span></div>
<div><span>RUN</span> echo <span>'alias python=python3'</span>
>> ~/.bashrc</div>
<div><span>RUN</span> echo <span>'alias pip=pip3'</span>
>> ~/.bashrc</div>
<br>
<div><span># Update C env vars so compiler can find gdal</span></div>
<div><span>ENV</span> <span>CPLUS_INCLUDE_PATH</span>=/usr/include/gdal</div>
<div><span>ENV</span> <span>C_INCLUDE_PATH</span>=/usr/include/gdal</div>
<div><br>
</div>
<div><span>RUN</span> pip3 install GDAL==2.2.3</div>
<div><br>
</div>
<div>When I try to build the image, I get the following
error message:</div>
<div>ERROR: Command errored out with exit status 1:
/usr/local/bin/python -u -c 'import io, os, sys,
setuptools, tokenize; sys.argv[0] =
'"'"'/tmp/pip-install-9sbmiien/gdal_b1debd2d108d43f38c9919e931126904/setup.py'"'"';
__file__='"'"'/tmp/pip-install-9sbmiien/gdal_b1debd2d108d43f38c9919e931126904/setup.py'"'"';f
= getattr(tokenize, '"'"'open'"'"', open)(__file__) if
os.path.exists(__file__) else io.StringIO('"'"'from
setuptools import setup; setup()'"'"');code =
f.read().replace('"'"'\r\n'"'"',
'"'"'\n'"'"');f.close();exec(compile(code, __file__,
'"'"'exec'"'"'))' install --record
/tmp/pip-record-sp2ip9vm/install-record.txt
--single-version-externally-managed --compile
--install-headers /usr/local/include/python3.7m/GDAL Check
the logs for full command output.<br>
</div>
<div><br>
</div>
<div>Does anyone know what is happening and some way to make
the installation work? Thank you!</div>
<div><br>
</div>
<div>Best regards,</div>
<div>Matheus</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>
</blockquote></div>