compiling PETSc included in the ET fails if "python" executable is missing

Create issue
Issue #2565 wontfix
Roland Haas created an issue

The copy of PETSc included in the ET’s ExternalLibraries uses a shebang “/usr/bin/env python” in some of the scripts used during compilation. This fails on modern Debian and Ubuntu (even LTS 20.04) systems that no longer provide a “python” executable unless one of the pyhon-is-pythonX packages is installed (for X \in {2,3}).

This should be fixed until the next release either by updating the included tarbal or patching the scripts to refer to either python2 or python3 (whichever one they actually need). Requiring a Debian package to be installed is not really an option, even though I suspect that the Debian / Ubuntu policy violates Python’s installation instructions.

Comments (5)

  1. Roland Haas reporter

    At least the tarball currently included (petsc-3.12.5.tar.gz) expects “python” to be “python2”. Sicne that version is from around 29-Mar-2020 a newer version may help.

  2. Roland Haas reporter

    Newer versions have the same assumption that a “python” executable exists. Neither one actually assumes it is “python2”, contrary to what I had said above.

    So there is no direct need to update anything. Systems without “python” may be Ubuntu or Debian and Ubuntu systems without one of the “python-is-python[23]” packages installed. Debian explicitly and knowlingly violates Python’s installation guidelines to force its users to make an explicit choice about which Python to install. See

    There is no obvious answer on how to patch since the tools that have “python” as their interpreteer in the #! line actually do seem to work with both python2 and python3 (and least on the Jenkins systems where I just tried this).

  3. Roland Haas reporter

    I suggest we close this and make sure that users install one of “python-is-python[23]” in our list of packages we provide for Debian and related distributions.

  4. Roland Haas reporter

    There is nothing wrong with expecting "python" to exist. In fact there not being a "python" is wrong.

  5. Log in to comment