MilesCranmer commited on
Commit
e372ae8
1 Parent(s): 5edf565

Clean up Python init

Browse files
Files changed (1) hide show
  1. pysr/julia_helpers.py +4 -9
pysr/julia_helpers.py CHANGED
@@ -175,20 +175,15 @@ def init_julia(julia_project=None, quiet=False, julia_kwargs=None):
175
  raise ImportError(_import_error())
176
 
177
  from julia.core import Julia
178
-
179
- Main = None
180
  try:
181
- jl = Julia(**julia_kwargs)
182
- from julia import Main as _Main
183
-
184
- Main = _Main
185
  except UnsupportedPythonError:
186
  # Static python binary, so we turn off pre-compiled modules.
187
  julia_kwargs = {**julia_kwargs, "compiled_modules": False}
188
- jl = Julia(**julia_kwargs)
189
- from julia import Main as _Main
190
 
191
- Main = _Main
 
192
 
193
  if julia_activated_env is None:
194
  julia_activated_env = processed_julia_project
 
175
  raise ImportError(_import_error())
176
 
177
  from julia.core import Julia
 
 
178
  try:
179
+ Julia(**julia_kwargs)
 
 
 
180
  except UnsupportedPythonError:
181
  # Static python binary, so we turn off pre-compiled modules.
182
  julia_kwargs = {**julia_kwargs, "compiled_modules": False}
183
+ Julia(**julia_kwargs)
 
184
 
185
+ from julia import Main as _Main
186
+ Main = _Main
187
 
188
  if julia_activated_env is None:
189
  julia_activated_env = processed_julia_project