Closed MilesCranmer closed 1 year ago
Could also do this automatically with
subprocess.call(
["julia", "-e", 'rm(joinpath(first(DEPOT_PATH), "packages", "PyCall"), recursive=true)']
)
followed by re-trying julia.install
. But I'm not sure if that is potentially dangerous or not. Wdyt @mkitti?
Umm, what's the primary issue. Is this new to Julia 1.9?
This issue has been around for a while. It seems to be related to when you update your Python or Julia version, and try to re-install PyJulia, some install preferences stored in PyCall are violated.
This an environment issue:
ERROR: LoadError: The following package names could not be resolved: * PyCall (not found in project or manifest)
It is missing the UUID.
Cool!
Automatically patches that PyCall error 🥳
Hi Cranmer, I came from the https://github.com/JuliaPy/PyCall.jl/pull/945 (I was looking into a similar issue a while back). Just wonder if you have checked https://cjdoris.github.io/PythonCall.jl/stable/juliacall/, which is an alternative to PyJulia that seems to have better Python/Julia environment/version support.
Btw, really like your works on neural-symbolic methods for physics. I have been following them and also did something related :)
Thanks and thanks for sending your exciting paper! Very cool stuff.
Yes I'm indeed interested in potentially switching to juliacall. From what I've seen the installation process is much nicer, and so it would be great to have it as the PySR -> Julia interface. Just need someone to try 🙏 🙏 . The API is pretty similar so it shouldn't be too bad to switch (basically just jl.eval
-> jl.seval
; and then removing julia_helpers.py
). The only downsides are that (1) it's fairly new whereas PyJulia has been around for a while and is "battle-tested", and (2) it doesn't sound like it can eliminate the precompilation issue we've been fighting for a while with static python installations (like conda). I'm not sure if (1) is an issue in practice though because juliacall is more Julia-heavy (rather than the Python-heavy PyJulia), so it's is probably safer to use longterm and has other advantages.
@mkitti I wonder if there is some way to do this automatically https://github.com/MilesCranmer/PySR/issues/257
TODO: