Having updated to version 3.14 of python, I get errors from sys.ps1 not being defined. This has been removed from the sys module of python for nointeractive shells, see python/cpython#130660. As a workaround I could patch pythontex3.py with
modified pythontex/pythontex3.py
@@ -72,6 +72,9 @@ if sys.version_info[0] == 2:
from io import open
else:
import pickle
+ if sys.version_info[0] == 3 and sys.version_info[1] >= 14:
+ sys.ps1 = ">>> "
+ sys.ps2 = "... "
But probably a more rigorous approach would be better, rather than relying on hardcoded strings.