Skip to content

Commit f057d30

Browse files
committed
fix: Automatic installation when the dependent package does not exist
1 parent 8268392 commit f057d30

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

milvus/__init__.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
import pathlib
77
import shutil
88
import os
9-
from importlib_resources import files
9+
10+
try:
11+
from importlib_resources import files
12+
except ModuleNotFoundError:
13+
os.system("pip install importlib_resources")
14+
1015
from distutils.dir_util import copy_tree
1116

1217
CONFIG_PATH = '/var/bin/e-milvus/configs/'

0 commit comments

Comments
 (0)