This is a creation in Article, where the information may have evolved or changed.
From the Internet, the installation of Paddlepaddle is mostly Docker containers running, some of which are installed using Ubuntu, such as this
Http://www.jianshu.com/p/3dd5dd27dab0
Paddle Beginner's starter http://doc.paddlepaddle.org/develop/doc_cn/
Installing and Compiling http://doc.paddlepaddle.org/develop/doc_cn/getstarted/build_and_install/cmake/build_from_source_cn.html
, because Paddlepaddle is Baidu Open source, does not have the international, uses the Google search also did not find the suitable CentOS installs Paddle tutorial instance, but Paddlepaddle official website has the Docker mac Ubuntu CentOS Of the four platform installation tutorial, it seems to be relatively simple, but apart from a language really like a mountain, or encountered some problems.
CentOS default CMake version low 2.8 to upgrade to 3,
See this article http://blog.csdn.net/l1028386804/article/details/50779092
- Download CMake Source code
https://cmake.org/download/
wget https://cmake.org/files/v3.3/cmake-3.3.2.tar.gz
2. Unzip
Tar xzvf cmake-3.3.2.tar.gz
3. Go to the CMake folder to execute the boot command
Note: The GCC, gcc-c++, install and version will be checked at this time, if not, please install first
Yum Install GCC
Yum Install gcc-c++
CD cmake-3.3.2
./bootstrap
4. Execute make
Gmake
5. Performing the installation (Root permission)
Make install
Paddlepaddle even if the source installation is dependent on Golang, it is necessary to build Golang environment on CentOS,
Goland address wget https://storage.googleapis.com/golang/go1.9.2.linux-amd64.tar.gz
See this article http://www.cnblogs.com/chy123/p/6750347.html
Https://golang.org/doc/install?download=go1.9.2.linux-amd64.tar.gz
Paddle's official website tutorial
Http://doc.paddlepaddle.org/release/0.10.0/doc/getstarted/build_and_install/build_from_source_en.html#centos
Official website See now paddle only support Python 2.7, so build to determine the version of Python, now does not support Python 3.*
The last two parts of the paddlepaddle are stuck, and cmake is actually equivalent to a Java Maven build tool, but if it doesn't work, you're going to have a super headache.
mkdir Build && CD Build
You can add build option here, such as:
Cmake3. -dcmake_install_prefix=/usr/local/paddle/build #<path to Install>
Want to install paddlepaddle into the system with sudo make install
Make-j nproc
&& make install
Set Paddlepaddle installation path in ~/.BASHRC
Export Path=<path to Install>/bin: $PATH
Install Paddlepaddle Python modules.
sudo pip install <path to INSTALL>/OPT/PADDLE/SHARE/WHEELS/*.WHL
The pit is executing the cmake3. -dcmake_install_prefix=/usr/local/paddle/build times wrong
By looking at the log logs of the error
Found
Cc1:error:command line option '-wnon-virtual-dtor ' was valid for c++/objc++ and not for C [-werror]
Cc1:all warnings being treated as errors
That is, cmake the warning as a mistake, hindering the construction,
That this warning is actually C + + support this parameter, and C is not supported, that is, CMake here by default called the C compiler instead of C + +, if you let CMake's default compiler specified is C + +, this link can be solved, or let cmake do not take the warning as error handling
In fact, CMake can be set parameters ignore the warning, cmake-h can see the parameters and explanations, but I tried many times or failed
Well, not to deceive everyone, I was stuck here, after this hurdle I guess there is no problem, and so I solved this, it is complete
Image.png