mirror of https://github.com/crytic/slither
parent
06d70856bd
commit
7f39c77219
@ -1,9 +1 @@ |
||||
# from https://stackoverflow.com/questions/563022/whats-python-good-practice-for-importing-and-offering-optional-features |
||||
import sys |
||||
|
||||
try: |
||||
import fastText |
||||
except ImportError: |
||||
print("ERROR: in order to use slither-simil, you need to install fastText 0.2.0:") |
||||
print("$ pip3 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip --user\n") |
||||
sys.exit(-1) |
||||
from .model import load_model |
||||
|
@ -0,0 +1,11 @@ |
||||
import sys |
||||
|
||||
try: |
||||
from fastText import load_model |
||||
from fastText import train_unsupervised |
||||
except ImportError: |
||||
print("ERROR: in order to use slither-simil, you need to install fastText 0.2.0:") |
||||
print("$ pip3 install https://github.com/facebookresearch/fastText/archive/0.2.0.zip --user\n") |
||||
sys.exit(-1) |
||||
|
||||
|
Loading…
Reference in new issue