MilesCranmer / PySR

High-Performance Symbolic Regression in Python and Julia
https://astroautomata.com/PySR
Apache License 2.0
2.11k stars 198 forks source link

Include Python and Julia version in PySR env #365

Closed MilesCranmer closed 4 months ago

MilesCranmer commented 1 year ago

Rather than @pysr-0.14.2 as the Julia environment, this would make it @pysr-0.14.2-py-3.11-jl-1.9. Thus the user would need to re-install for each combination of Python and Julia they wish to use PySR with. This is to prevent some of the issues noted in #257

cc @mkitti @ngam I wonder if this would pose an issue for conda at all? If I install a different julia version in conda, it would also trigger a new PySR install, right?

mkitti commented 1 year ago

It is not clear to me that this will work because I'm not sure if PyCall.jl has localized the Python setting to the environment.

What we need is for PyCall.jl is to implement https://github.com/JuliaPackaging/Preferences.jl

MilesCranmer commented 1 year ago

Here is the PR: https://github.com/JuliaPy/PyCall.jl/pull/945

Since it’s 2 years old with no recent updates maybe the solution in the meantime is to just delete the PyCall deps whenever someone installs PySR?

MilesCranmer commented 1 year ago

Actually it probably makes sense to include this regardless for the Julia tag, because the Manifest file might be incompatible (say some Julia package differs for older Julia versions).