<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hello All,<div class=""><br class=""></div><div class="">I use an Ubuntu docker image based on jedbrown/mpich-ccache and ran into the following error (Dockerfile attached as well).</div><div class=""><br class=""></div><div class="">If in a user only has python3 installed and not python2 then /usr/bin/python doesn’t exist. Given that python2 has gone the way of the dodo perhaps petsc should be looking for python3 over python2. This is a somewhat funky but functioning implementation that replaces the shebang line in configure that I have been using to default to python3. I don’t know how portable it is however, I believe “command" is not universally available in every shell?</div><div class=""><pre class="default prettyprinted prettyprint">#!/bin/sh</pre><pre class="default prettyprinted prettyprint"># “”” is comment in python, and : is noop in shell so this configure can be run as ./configure and python2.7 ./configure<br class="">""":"<br class=""><br class="Apple-interchange-newline"># Find the right python implementation, check by sending it on over to dave<br class="">for pyimpls in python3 python2 python /usr/bin/python /usr/bin/env python ; do<div class=""> command -v > /dev/null $pyimpls && exec $pyimpls $0 "$@“</div>done</pre><pre class="default prettyprinted prettyprint"># Error code in case things go awry </pre><pre class="default prettyprinted prettyprint">Echo “PYTHON NOT FOUND” >2</pre><pre class="default prettyprinted prettyprint">exit 2</pre><pre class="default prettyprinted prettyprint">":"""</pre><div class="">if sys.version_info < (2,6) or (sys.version_info >= (3,0) and sys.version_info < (3,4)):<br class=""> print('************************************************************************')<br class=""> print('* Python version 2.6+ or 3.4+ is required to run ./configure *')<br class=""> print('* Try: "python2.7 ./configure" or "python3 ./configure" *')<br class=""> print('************************************************************************')<br class=""> sys.exit(4)<br class=""><br class="">sys.path.insert(0, os.path.abspath('config'))<br class="">import configure<br class="">configure.petsc_configure([])</div></div><div class=""><br class=""></div><div class=""></div></body></html>