--- test/Makefile.am.orig	2015-01-06 01:34:32.000000000 +1100
+++ test/Makefile.am	2023-01-18 17:49:32.000000000 +1100
@@ -23,7 +23,7 @@
 bench_LDADD = ../libevent.la
 
 regress.gen.c regress.gen.h: regress.rpc $(top_srcdir)/event_rpcgen.py
-	$(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed"
+	/usr/bin/python3 $(top_srcdir)/event_rpcgen.py $(srcdir)/regress.rpc || echo "No Python installed"
 
 DISTCLEANFILES = *~
 
--- event_rpcgen.py.orig	2015-01-06 01:34:32.000000000 +1100
+++ event_rpcgen.py	2023-01-18 18:14:26.000000000 +1100
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
 #
 # Copyright (c) 2005 Niels Provos <provos@citi.umich.edu>
 # All rights reserved.
