安装步骤:python
# Install git if not already installed. sudo yum -y install git-all
# Clone mxnet repository. In terminal, run the commands WITHOUT "sudo"
git clone https://github.com/dmlc/mxnet.git ~/mxnet --recursive
# Install MXNet for Python with all required dependencies cd ~/mxnet/setup-utils bash install-mxnet-amz-linux.sh # We have added MXNet Python package path in your ~/.bashrc. # Run the following command to refresh environment variables. $ source ~/.bashrc
步骤虽然简单,可是安装过程当中可能会遇到如下问题,linux
1.c++
找不到这些包,可能的缘由,是由于官方没有给出rehat的安装文档,这个是按照官方给出的Amazon Linux上面的安装步骤来的,因此,可能的缘由就是在redhat中这些包不叫上面的名字。git
如今安装的过程当中能够不纠结这些问题,编辑install-mxnet-amz-linux.sh,注释掉以下两行便可:github
2.bash
若是是停在这里不动了,或者报这样的错:测试
到这里下载ippicv,点击 下载,而后放到/root/mxnet/setup-utils/opencv/3rdparty/ippicv/downloads/linux-808b791a6eac9ed78d32a7666804320e/ 目录下,ui
若改目录原来就有这个ippicv的文件,删除它。而后从新编译。spa
3.code
遇到这个问题的时候查找了下lapacke_mangling.h文件,发如今
而后就把该文件从/root/mxnet/setup-utils/OpenBLAS/lapack-netlib/LAPACKE/include/lapacke_mangling.h拷贝到/usr/local/include/
从新编辑。
4.
安装openblase-devel,和gcc-c++
yum install openblase-deve gcc-c++ python-devel
[root@localhost ~]# cd /root/mxnet/example/image-classification/
[root@localhost image-classification]# python train_mnist.py
若是能正常跑出结果则配置完成。