Skip to content

Commit 26ff5a5

Browse files
typhoonzerochengduo
authored andcommitted
Add note when import core.so error (#11918)
* add note when import core.so error * update
1 parent 94e7a61 commit 26ff5a5

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

python/paddle/fluid/framework.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,16 @@
1919
import numpy as np
2020

2121
import proto.framework_pb2 as framework_pb2
22-
from . import core
22+
try:
23+
from . import core
24+
except ImportError, e:
25+
raise ImportError(
26+
"""NOTE: You may need to run \"export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\"
27+
if you encounters \"libmkldnn.so not found\" errors. If you have python
28+
installed in other directory, replace \"/usr/local/lib\" with your own
29+
directory. The original error is: """ % str(e))
30+
except Exception, e:
31+
raise e
2332
import unique_name
2433

2534
__all__ = [

0 commit comments

Comments
 (0)