<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Perhaps related to <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/issues/4467">https://github.com/OSGeo/gdal/issues/4467</a> ?
      where upgrading setuptools was suggested<br>
    </p>
    <div class="moz-cite-prefix">Le 23/09/2021 à 18:40, Matheus
      Cammarosano Hidalgo a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJtzTOCXNPqf8BG04r26UkzACQBZbSPuqkK4OJaPOp_0eMwGdQ@mail.gmail.com">
      <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 class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>