Until the PR at JuliaPy/pyjulia#538 is merged, PySR is currently incompatible with Python 3.12. This is due to a breaking change in the way Python allowed PyJulia to overload the import function (like from julia import SymbolicRegression). It seems to be an easy patch though, luckily.