| Hello All, I use an Ubuntu docker image based on jedbrown/mpich-ccache and ran into the following error (Dockerfile attached as well). 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? #!/bin/sh # “”” is comment in python, and : is noop in shell so this configure can be run as ./configure and python2.7 ./configure # Error code in case things go awry Echo “PYTHON NOT FOUND” >2 exit 2 ":""" if sys.version_info < (2,6) or (sys.version_info >= (3,0) and sys.version_info < (3,4)): print('************************************************************************') print('* Python version 2.6+ or 3.4+ is required to run ./configure *') print('* Try: "python2.7 ./configure" or "python3 ./configure" *') print('************************************************************************') sys.exit(4) sys.path.insert(0, os.path.abspath('config')) import configure configure.petsc_configure([]) |
Dockerfile
Description: Binary data
Best regards, Jacob Faibussowitsch (Jacob Fai - booss - oh - vitch) Cell: (312) 694-3391 |
