paddlepaddle環境安裝與過程出錯處理
1、進入paddlepaddle官網,入口:http://www.paddlepaddle.org/;
2、參照5分鐘快速入門,安裝paddlepadle環境,本機環境Linux CentOS7,命令如下 :
錯誤1:gcc未安裝,錯誤提示如下:
yum -y install gcc.x86_64
錯誤2:Python.h未找著,錯誤提示如下:
2、參照5分鐘快速入門,安裝paddlepadle環境,本機環境Linux CentOS7,命令如下 :
pip install paddlepaddle
3、正常情況下,會圓滿安裝完畢,參照如下成功的提示:Successfully installed cycler-0.10.0 kiwisolver-1.0.1 matplotlib-2.2.0 paddlepaddle-0.11.0 protobuf-3.1.0 python-dateutil-2.6.1 pytz-2018.3 rarfile-3.0 recordio-0.1.5 requests-2.9.2 subprocess32-3.2.7
4、但限于我本機的環境,安裝過程中共出現過兩次錯誤:錯誤1:gcc未安裝,錯誤提示如下:
unable to execute gcc: No such file or directory
error: command 'gcc' failed with exit status 1
解決方法:error: command 'gcc' failed with exit status 1
yum -y install gcc.x86_64
錯誤2:Python.h未找著,錯誤提示如下:
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c _posixsubprocess.c -o build/temp.linux-x86_64-2.7/_posixsubprocess.o
_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
解決方法:安裝一個對應的devel環境即可:_posixsubprocess.c:3:20: fatal error: Python.h: No such file or directory
#include "Python.h"
^
compilation terminated.
error: command 'gcc' failed with exit status 1
yum -y install python-devel
5、成功安裝完成paddlepaddle環境,并成功運行paddlepaddle房價預測的示例。
posted on 2018-03-11 20:17 小一敗涂地 閱讀(1576) 評論(0) 編輯 收藏 所屬分類: AI