Spaces:
Running
Running
MilesCranmer
commited on
Try to install second time with PyCall
Browse files- pysr/julia_helpers.py +6 -6
pysr/julia_helpers.py
CHANGED
@@ -84,13 +84,13 @@ def install(julia_project=None, quiet=False, precompile=None): # pragma: no cov
|
|
84 |
try:
|
85 |
julia.install(quiet=quiet)
|
86 |
except julia.tools.PyCallInstallError:
|
87 |
-
|
88 |
-
|
89 |
-
"
|
90 |
-
"and re-try installation. For further assistance, "
|
91 |
-
"please see the issue "
|
92 |
-
"https://github.com/MilesCranmer/PySR/issues/257."
|
93 |
)
|
|
|
|
|
|
|
94 |
|
95 |
Main, init_log = init_julia(julia_project, quiet=quiet, return_aux=True)
|
96 |
io_arg = _get_io_arg(quiet)
|
|
|
84 |
try:
|
85 |
julia.install(quiet=quiet)
|
86 |
except julia.tools.PyCallInstallError:
|
87 |
+
# Attempt to reset PyCall.jl's build:
|
88 |
+
subprocess.run(
|
89 |
+
["julia", "-e", f'ENV["PYTHON"] = "{sys.executable}"; import Pkg; Pkg.build("PyCall")'],
|
|
|
|
|
|
|
90 |
)
|
91 |
+
# Try installing again:
|
92 |
+
julia.install(quiet=quiet)
|
93 |
+
|
94 |
|
95 |
Main, init_log = init_julia(julia_project, quiet=quiet, return_aux=True)
|
96 |
io_arg = _get_io_arg(quiet)
|