Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: PySR currently incompatible with Python 3.12 #451

Closed
MilesCranmer opened this issue Oct 30, 2023 · 4 comments
Closed

[BUG]: PySR currently incompatible with Python 3.12 #451

MilesCranmer opened this issue Oct 30, 2023 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@MilesCranmer
Copy link
Owner

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.

@MilesCranmer MilesCranmer added the bug Something isn't working label Oct 30, 2023
@MilesCranmer MilesCranmer self-assigned this Oct 30, 2023
@MilesCranmer MilesCranmer pinned this issue Oct 30, 2023
@PaulGersberg
Copy link

PaulGersberg commented Nov 6, 2023

Also incompatible with 3.11.6
python -m pysr install
Traceback (most recent call last): File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\pysr\__main__.py", line 4, in <module> _cli(prog_name="pysr") File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\click\core.py", line 1157, in __call__ return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\click\core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\click\core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\pysr\julia_helpers.py", line 283, in _julia_version_assertion if not is_julia_version_greater_eq(version=(1, 6, 0)): ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\pysr\julia_helpers.py", line 147, in is_julia_version_greater_eq juliainfo = _load_juliainfo() ^^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\pysr\julia_helpers.py", line 25, in _load_juliainfo juliainfo = JuliaInfo.load(julia="julia") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\pgersber\AppData\Local\miniconda3\Lib\site-packages\julia\juliainfo.py", line 87, in load raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['julia', '-e', '...']' returned non-zero exit status 1.

@MilesCranmer
Copy link
Owner Author

MilesCranmer commented Nov 6, 2023

Hi @PaulGersberg,
That looks like a different issue. The 3.12 incompatibility is specifically related to how imports work in PyJulia (which was introduced in 3.12.0, but not earlier).
Cheers,
Miles

@MilesCranmer
Copy link
Owner Author

Fixed with PyJulia 0.6.2: https://github.com/JuliaPy/pyjulia/releases/tag/v0.6.2

@MilesCranmer
Copy link
Owner Author

Fixed by #535 (for good this time)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants