MilesCranmer / PySR

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

[BUG] Installation failure at "juliainfo.py" with "subprocess.CalledProcessError" #224

Closed Zhonglu closed 1 year ago

Zhonglu commented 1 year ago

Describe the bug Installation failure with "subprocess.CalledProcessError"

I installed julia in WSL Ubuntu by command line. Then, run: pip install -U pysr Yet, python -c 'import pysr; pysr.install()' did not work. Please see error message below.

Version (please include the following information):

Configuration

Error message Add the error message here, or whatever other information would be useful for debugging. log below: ~/pysr$ python3 -c 'import pysr; pysr.install()' Traceback (most recent call last): File "", line 1, in File "/home/flyme2004/.local/lib/python3.8/site-packages/pysr/julia_helpers.py", line 74, in install _julia_version_assertion() File "/home/flyme2004/.local/lib/python3.8/site-packages/pysr/julia_helpers.py", line 223, in _julia_version_assertion if not is_julia_version_greater_eq(version=(1, 6, 0)): File "/home/flyme2004/.local/lib/python3.8/site-packages/pysr/julia_helpers.py", line 122, in is_julia_version_greater_eq juliainfo = _load_juliainfo() File "/home/flyme2004/.local/lib/python3.8/site-packages/pysr/julia_helpers.py", line 23, in _load_juliainfo juliainfo = JuliaInfo.load(julia="julia") File "/home/flyme2004/.local/lib/python3.8/site-packages/julia/juliainfo.py", line 87, in load raise subprocess.CalledProcessError( subprocess.CalledProcessError: Command '['julia', '-e', '...']' returned non-zero exit status 1.

Additional context I have searched the issue log, yet could not find any clue. Appreciate any comment. Looking forward to apply PySR in my new paper.

Zhonglu commented 1 year ago

testing newer version of julia

MilesCranmer commented 1 year ago

Looks like it can’t find the location of Julia. Check your PATH variable?

MilesCranmer commented 1 year ago

julia version 1.4.1

this also won’t work, you need Julia 1.6 or higher

MilesCranmer commented 1 year ago

(Didn’t mean to close)

Zhonglu commented 1 year ago

Hi Miles,

Thank you. I believe I have resolved it. The PySR runs well with the example!

Another Note: I could not download package in Julia unless changing the source: export JULIA_PKG_SERVER="https://mirrors.bfsu.edu.cn/julia" in the ubuntu terminal. Perhaps because I am using it from China.

With kind regards,

Mike

MilesCranmer commented 1 year ago

Awesome! Glad to hear it’s working.