www.cendio.com
Bug 7294 - server installer/tl-setup does not automatically find Python 2.7 on RHEL8
: server installer/tl-setup does not automatically find Python 2.7 on RHEL8
Status: CLOSED FIXED
: ThinLinc
Server Installer
: trunk
: PC Linux Red Hat
: P2 Normal
: 4.10.1
Assigned To:
:
:
:
: 7328
  Show dependency treegraph
 
Reported: 2018-12-12 10:18 by
Modified: 2019-06-26 13:24 (History)
Acceptance Criteria:
* All parts of the product should refer to "python2"; not "python"


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From cendio 2018-12-12 10:18:33
> # ./install-server 
> 
> Error: No Python 2.x interpreter found.
> 
> A Python 2.x interpreter is required for ThinLinc.
> I was trying to use the Python interpreter named 'python'.
> 
> If Python is installed under a different name, set the PYTHON
> environment variable to the Python binary to use. Example:
> PYTHON=/usr/bin/python2.6 ./install-server
> 
> To install Python, please run this command:
> 
>     dnf install python
> 
> Would you like to run this command now?
> 
> (Y/n)? n
>
> Please try again once Python is installed.
>
> # which python
> /usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
>
> # which python2
> /usr/bin/python2
>
> # which python2.7
> /usr/bin/python2.7


While you could set PYTHON=/usr/bin/python2.7, it's a rather poor experience.
Given that we only support Python 2.6 and 2.7, searching for any of python2.7
python2.6 python2 python would go a long way to get a nicer installation
experience.
------- Comment #1 From cendio 2019-04-09 09:36:23 -------
(In reply to comment #0)
> > # ./install-server 
> > 
> > Error: No Python 2.x interpreter found.
> > 
> > A Python 2.x interpreter is required for ThinLinc.
> > I was trying to use the Python interpreter named 'python'.
> > 
> > If Python is installed under a different name, set the PYTHON
> > environment variable to the Python binary to use. Example:
> > PYTHON=/usr/bin/python2.6 ./install-server
> > 
> > To install Python, please run this command:
> > 
> >     dnf install python
> > 
> > Would you like to run this command now?
> > 
> > (Y/n)? n
> >
> > Please try again once Python is installed.
> >
> > # which python
> > /usr/bin/which: no python in (/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin)
> >
> > # which python2
> > /usr/bin/python2
> >
> > # which python2.7
> > /usr/bin/python2.7
> 
> 
> While you could set PYTHON=/usr/bin/python2.7, it's a rather poor experience.

Slightly easier:

PYTHON=python2 ./install-server
------- Comment #2 From cendio 2019-06-24 10:09:29 -------
According to https://www.python.org/dev/peps/pep-0394/, we should refer to
"python2":

"python2 will refer to some version of Python 2.x."

See also https://blogs.gnome.org/mcatanzaro/2018/02/16/on-python-shebangs/. I
believe we should change "python" to "python2" in our setup tools.
------- Comment #3 From cendio 2019-06-24 10:13:19 -------
"python2" is available on RHEL6, Ubuntu 16.04 and SLES12. I believe it should
be available on most systems we support. Otherwise, the fallback path with
PYTHON=python can be used.
------- Comment #5 From cendio 2019-06-25 13:24:19 -------
Almost. Something goes wrong with the graphical sudo handling. I'm getting the
error:

  tl-ssh-askpass: line 15: exec: python: not found
------- Comment #8 From cendio 2019-06-26 13:24:33 -------
Works well now. Tested on RHEL 6, RHEL 8, Fedora 30 and SLES 15.