Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
375cf2f
1
Parent(s):
cc9adea
Ensure that the JuliaInfo is reset after install
Browse files- pysr/julia_helpers.py +9 -0
pysr/julia_helpers.py
CHANGED
@@ -28,6 +28,12 @@ def load_juliainfo():
|
|
28 |
return juliainfo
|
29 |
|
30 |
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
def _set_julia_project_env(julia_project, is_shared):
|
32 |
if is_shared:
|
33 |
if is_julia_version_greater_eq(version=(1, 7, 0)):
|
@@ -79,6 +85,9 @@ def install(julia_project=None, quiet=False): # pragma: no cover
|
|
79 |
" so that the Julia environment is properly initialized."
|
80 |
)
|
81 |
|
|
|
|
|
|
|
82 |
|
83 |
def import_error_string(julia_project=None):
|
84 |
s = """
|
|
|
28 |
return juliainfo
|
29 |
|
30 |
|
31 |
+
def reset_juliainfo():
|
32 |
+
"""Reset juliainfo to None."""
|
33 |
+
global juliainfo
|
34 |
+
juliainfo = None
|
35 |
+
|
36 |
+
|
37 |
def _set_julia_project_env(julia_project, is_shared):
|
38 |
if is_shared:
|
39 |
if is_julia_version_greater_eq(version=(1, 7, 0)):
|
|
|
85 |
" so that the Julia environment is properly initialized."
|
86 |
)
|
87 |
|
88 |
+
# Ensure that the JuliaInfo is reset:
|
89 |
+
reset_juliainfo()
|
90 |
+
|
91 |
|
92 |
def import_error_string(julia_project=None):
|
93 |
s = """
|