[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251020093136.GD281971@e132581.arm.com>
Date: Mon, 20 Oct 2025 10:31:36 +0100
From: Leo Yan <leo.yan@....com>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...hat.com>,
Arnaldo Carvalho de Melo <acme@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Jiri Olsa <jolsa@...nel.org>, Ian Rogers <irogers@...gle.com>,
Adrian Hunter <adrian.hunter@...el.com>,
linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] perf build: Add Debian/Ubuntu python-is-python3
On Sun, Oct 19, 2025 at 11:49:56AM +0900, Namhyung Kim wrote:
[...]
> > Aha, I found it. After uninstalling python3-dev, I got into the same
> > state as yesterday:
> >
> > $ make tools/perf
> > [...]
> > Makefile.config:875: No python interpreter was found: disables
> > Python support - please install python-devel/python-dev
> > Makefile.config:918: *** ERROR: No python interpreter needed for
> > jevents generation. Install python or build with NO_JEVENTS=1.. Stop.
> >
> > So these error messages sound like python is missing. And "python"
> > is indeed missing, but "python3" is available.
> > Hence I installed python-is-python3, but that turned out not to be
> > sufficient.
> > Hence I also installed python-dev-is-python3, and that fixed the issue,
> > as python-dev-is-python3 depends on python3-dev, so the latter was
> > installed, too.
> >
> > After removing python-is-python3 and python-dev-is-python3, everything
> > keeps on working. But if you never installed python3-dev manually,
> > and run "sudo apt autoremove", python3-dev is uninstalled, reintroducing
> > the issue.
> >
> > So just recomming to install python-dev-is-python3 in the error
> > message should be sufficient?
> >
> > What do you think?
Can we explicitly suggest that developers install python3-devel or
python3-dev instead? Two reasons:
- python-dev-is-python3 is specific to Ubuntu/Debian; some distros do
not provide this package and even advocate against using unversioned
"/usr/bin/python" shebangs [1].
- As Namhyung mentioned, perf has removed Python 2 support (at least
this is claimed), it is straightforward to install only the Python3
packages.
[...]
> I think the code was to deal with either python2 or python3 in the past
> and we removed python2 support recently. I don't know if any distro
> made 'python' to refer python3 and removed 'python3' otherwise we can
> just check python3.
I agreed with only checking python3 - neat and compatible for distros.
Just note, some legacy python shebangs are left, we can update to
"#!/usr/bin/env python3" but this can be done separately.
$ git grep "#\!.*/usr/bin.*python"
python/tracepoint.py:#! /usr/bin/env python
python/twatch.py:#! /usr/bin/env python
scripts/python/export-to-postgresql.py:# #!/usr/bin/python2
scripts/python/exported-sql-viewer.py:#!/usr/bin/env python
scripts/python/libxed.py:#!/usr/bin/env python
tests/shell/lib/perf_json_output_lint.py:#!/usr/bin/python
Thanks,
Leo
[1] https://fedoraproject.org/wiki/Changes/Move_usr_bin_python_into_separate_package#Motivation
Powered by blists - more mailing lists