Deepin Linux 安装错误: /home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.so: undefined symbol: mkldnn_primitive_desc_query_pd
Created by: ddayzzz
- 版本、环境信息: 1)PaddlePaddle版本:release 1.4 2)CPU:INTEL I7 6700HQ,MKL=ON,系统中存在MKL 3)GPU:NVIDIA GTX950M,CUDA9.0和CUDNN7.0 4)系统环境:Deepin 15, Python3.6(Anaconda)
- 安装方式信息: 1)本地编译:cmake .. -DPY_VERSION=3.6 -DWITH_FLUID_ONLY=ON -DWITH_GPU=ON -DWITH_TESTING=OFF -DCMAKE_BUILD_TYPE=Release; make -j8
编译成功后的输出:
[100%] Built target paddle_python
(ml) shu@shu-deepin-laptop:~/Paddle/build$ cd python/dist/
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ ll
总用量 132324
-rw-r--r-- 1 shu shu 135498974 6月 21 14:17 paddlepaddle_gpu-0.0.0-cp36-cp36m-linux_x86_64.whl
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ file paddlepaddle_gpu-0.0.0-cp36-cp36m-linux_x86_64.whl
paddlepaddle_gpu-0.0.0-cp36-cp36m-linux_x86_64.whl: Zip archive data, at least v2.0 to extract
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ ls -al
总用量 132332
drwxr-xr-x 2 shu shu 4096 6月 21 14:17 .
drwxr-xr-x 7 shu shu 4096 6月 21 14:17 ..
-rw-r--r-- 1 shu shu 135498974 6月 21 14:17 paddlepaddle_gpu-0.0.0-cp36-cp36m-linux_x86_64.whl
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ ls -al
在环境的 python 中输入:
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle.fluid as fluid
Traceback (most recent call last):
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/framework.py", line 41, in <module>
from . import core
ImportError: /home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.so: undefined symbol: mkldnn_primitive_desc_query_pd
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/__init__.py", line 18, in <module>
from . import framework
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/framework.py", line 56, in <module>
directory. The original error is: \n""" + cpt.get_exception_message(e))
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:
/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.so: undefined symbol: mkldnn_primitive_desc_query_pd
>>> exit()
尝试:export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/libs
在 pycharm 中可以正常导入 fluid, 但在终端中,无效(已经 ldconfig):
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/libs
(ml) shu@shu-deepin-laptop:~/Paddle/build/python/dist$ python
Python 3.6.5 |Anaconda, Inc.| (default, Apr 29 2018, 16:14:56)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import paddle.fluid as fluid
Traceback (most recent call last):
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/framework.py", line 41, in <module>
from . import core
ImportError: /home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.so: undefined symbol: mkldnn_primitive_desc_query_pd
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/__init__.py", line 18, in <module>
from . import framework
File "/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/framework.py", line 56, in <module>
directory. The original error is: \n""" + cpt.get_exception_message(e))
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:
/home/shu/miniconda3/envs/ml/lib/python3.6/site-packages/paddle/fluid/core.so: undefined symbol: mkldnn_primitive_desc_query_pd
>>> exit()