No `python` in PATH in recent Linux distros
With the EOL for python2, it appears that some Linux distros are now defaulting to installing /usr/bin/python3
without a /usr/bin/python
symlink. They then also provide an optional package with /usr/bin/python2
, but also without a /usr/bin/python
symlink. I can attest first-hand that Ubuntu 20.04 is one distro with this behavior by default.
The net result is that python scripts to be used on such a distro must be explicit about python2
vs python3
. UPC++ does not currently match this expectation and configure
fails by default:
ERROR: Python interpreter 'python' was not found in $PATH.
Use '--with-python=...' to specify a Python interpreter.
Comments (5)
-
reporter -
reporter - changed title to No `python` in PATH in recent Linux distros
-
reporter - changed status to open
Proposed solution in pull request 218
-
reporter - changed status to resolved
configure: search PATH for python3 and python2
This commit resolves issue
#373: "Nopython
in$PATH
in recent Linux distros" by addingpython3
andpython2
to the names searched for in$PATH
at configure time.→ <<cset f149db7532f0>>
-
configure: search PATH for python3 and python2
This commit resolves issue
#373: "Nopython
in$PATH
in recent Linux distros" by addingpython3
andpython2
to the names searched for in$PATH
at configure time.(cherry picked from commit f149db7532f00e640c0ca72104f84712f484ff8f)
Conflicts: configure
→ <<cset d59e7e0a8b3b>>
- Log in to comment
The obvious work-around (
configure --with-python=python3
) works as one would hope.However, we can/should do better by looking for
python3
orpython2
in addition to barepython
.