Skip to content

Commit 8758f74

Browse files
committed
Only require Jill if Julia is not already installed
1 parent b0ce7ce commit 8758f74

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

diffeqpy/__init__.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
import shutil
2-
from jill.install import install_julia
2+
3+
try:
4+
from jill.install import install_julia
5+
except ModuleNotFoundError:
6+
def install_julia():
7+
# install_julia() is only called if Julia is not already installed.
8+
# Defining this dummy function allows diffeqpy to be used without Jill
9+
# if Julia has already been installed.
10+
raise RuntimeError("Could not install Julia as the Jill module was not found.")
311

412
# juliacall must be loaded after `_ensure_julia_installed()` is run,
513
# so this import is in `load_julia_packages()`

0 commit comments

Comments
 (0)