From 26ff5a53eeaf44856052b69b9b5d5bf6999376f1 Mon Sep 17 00:00:00 2001 From: Wu Yi Date: Tue, 3 Jul 2018 23:03:34 +0800 Subject: [PATCH] Add note when import core.so error (#11918) * add note when import core.so error * update --- python/paddle/fluid/framework.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/python/paddle/fluid/framework.py b/python/paddle/fluid/framework.py index 9dcd907451..93cd6b621a 100644 --- a/python/paddle/fluid/framework.py +++ b/python/paddle/fluid/framework.py @@ -19,7 +19,16 @@ import re import numpy as np import proto.framework_pb2 as framework_pb2 -from . import core +try: + from . import core +except ImportError, e: + raise ImportError( + """NOTE: You may need to run \"export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\" + if you encounters \"libmkldnn.so not found\" errors. If you have python + installed in other directory, replace \"/usr/local/lib\" with your own + directory. The original error is: """ % str(e)) +except Exception, e: + raise e import unique_name __all__ = [ -- GitLab