Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
4bc0a76
1
Parent(s):
cb832ca
Formally deprecate Julia <1.6 (#194)
Browse files- pysr/julia_helpers.py +10 -0
pysr/julia_helpers.py
CHANGED
@@ -62,6 +62,7 @@ def install(julia_project=None, quiet=False): # pragma: no cover
|
|
62 |
"""
|
63 |
import julia
|
64 |
|
|
|
65 |
# Set JULIA_PROJECT so that we install in the pysr environment
|
66 |
julia_project, is_shared = _process_julia_project(julia_project)
|
67 |
_set_julia_project_env(julia_project, is_shared)
|
@@ -159,6 +160,7 @@ def init_julia(julia_project=None):
|
|
159 |
|
160 |
from julia.core import JuliaInfo, UnsupportedPythonError
|
161 |
|
|
|
162 |
julia_project, is_shared = _process_julia_project(julia_project)
|
163 |
_set_julia_project_env(julia_project, is_shared)
|
164 |
|
@@ -210,3 +212,11 @@ def _escape_filename(filename):
|
|
210 |
str_repr = str(filename)
|
211 |
str_repr = str_repr.replace("\\", "\\\\")
|
212 |
return str_repr
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
"""
|
63 |
import julia
|
64 |
|
65 |
+
_version_assertion()
|
66 |
# Set JULIA_PROJECT so that we install in the pysr environment
|
67 |
julia_project, is_shared = _process_julia_project(julia_project)
|
68 |
_set_julia_project_env(julia_project, is_shared)
|
|
|
160 |
|
161 |
from julia.core import JuliaInfo, UnsupportedPythonError
|
162 |
|
163 |
+
_version_assertion()
|
164 |
julia_project, is_shared = _process_julia_project(julia_project)
|
165 |
_set_julia_project_env(julia_project, is_shared)
|
166 |
|
|
|
212 |
str_repr = str(filename)
|
213 |
str_repr = str_repr.replace("\\", "\\\\")
|
214 |
return str_repr
|
215 |
+
|
216 |
+
|
217 |
+
def _version_assertion():
|
218 |
+
if not is_julia_version_greater_eq(version=(1, 6, 0)):
|
219 |
+
raise NotImplementedError(
|
220 |
+
"PySR requires Julia 1.6.0 or greater. "
|
221 |
+
"Please update your Julia installation."
|
222 |
+
)
|