Skip to content

Commit ddb99a1

Browse files
committed
Added check before installation
1 parent 7af180c commit ddb99a1

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

sdk_utils.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,17 @@
2020

2121
from utils import install_package
2222

23+
2324
try:
24-
install_package('mmh3')
25-
except CalledProcessError:
26-
install_package('pymmh3')
25+
from mmh3 import hash, hash128
26+
except ImportError:
27+
try:
28+
from pymmh3 import hash, hash128
29+
except ImportError:
30+
try:
31+
install_package('mmh3')
32+
except CalledProcessError:
33+
install_package('pymmh3')
2734

2835
try:
2936
from mmh3 import hash, hash128

0 commit comments

Comments
 (0)