diff --git a/x2paddle/convert.py b/x2paddle/convert.py index a7b6b906de8133041f4c5e9d8e3909c290702e43..678e66c9bf92ba3764fcb4d921247a097e71e7f5 100644 --- a/x2paddle/convert.py +++ b/x2paddle/convert.py @@ -165,10 +165,22 @@ def main(): if args.version: import x2paddle - print("x2paddle-{} with python>=3.5, paddlepaddle>=1.5.0\n".format( + print("x2paddle-{} with python>=3.5, paddlepaddle>=1.6.1\n".format( x2paddle.__version__)) return + try: + import paddle + v0, v1, v2 = paddle.__version__.split('.') + if v0 == 0 and v1 == 0 and v2 == 0: + print("You have installed paddlepaddle-dev? We're not sure it's working for x2paddle!" + elif int(v0) != 1 or int(v1) < 6: + print("paddlepaddle>=1.6.1 is required") + return + except: + print("paddlepaddle not installed, use \"pip install paddlepaddle\"") + return + assert args.framework is not None, "--framework is not defined(support tensorflow/caffe/onnx)" assert args.save_dir is not None, "--save_dir is not defined"