CentOS 安装mxnet

安装过程保存

官方安装指南
https://mxnet.incubator.apache.org/install/index.html

[root@localhost icooper]# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mxnet
Collecting mxnet
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/9a/4b/8fe47d8f044c78d5adfdfceffb664bdeca13bee2bf8ec7799ebf4d831c23/mxnet-1.1.0-py2.py3-none-manylinux1_x86_64.whl (23.7MB)
    100% |████████████████████████████████| 23.8MB 59kB/s 
Collecting requests==2.18.4 (from mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/49/df/50aa1999ab9bde74656c2919d9c0c085fd2b3775fd3eca826012bef76d8c/requests-2.18.4-py2.py3-none-any.whl (88kB)
    100% |████████████████████████████████| 92kB 7.2MB/s 
Collecting graphviz==0.8.1 (from mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/82/cc/668725769a1b184322019b494bbdfbb82bbef5cecc1dd8be6f778cf1422b/graphviz-0.8.1-py2.py3-none-any.whl
Collecting numpy<=1.13.3 (from mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/eb/be/737f3df5806192ac4096e549e48c8c76cfaa2fb880a1c62a7bb085adaa9b/numpy-1.13.3-cp27-cp27mu-manylinux1_x86_64.whl (16.6MB)
    100% |████████████████████████████████| 16.7MB 82kB/s 
Collecting chardet<3.1.0,>=3.0.2 (from requests==2.18.4->mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/bc/a9/01ffebfb562e4274b6487b4bb1ddec7ca55ec7510b22e4c51f14098443b8/chardet-3.0.4-py2.py3-none-any.whl (133kB)
    100% |████████████████████████████████| 143kB 4.2MB/s 
Collecting certifi>=2017.4.17 (from requests==2.18.4->mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/fa/53/0a5562e2b96749e99a3d55d8c7df91c9e4d8c39a9da1f1a49ac9e4f4b39f/certifi-2018.1.18-py2.py3-none-any.whl (151kB)
    100% |████████████████████████████████| 153kB 4.0MB/s 
Collecting urllib3<1.23,>=1.21.1 (from requests==2.18.4->mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/63/cb/6965947c13a94236f6d4b8223e21beb4d576dc72e8130bd7880f600839b8/urllib3-1.22-py2.py3-none-any.whl (132kB)
    100% |████████████████████████████████| 133kB 3.9MB/s 
Collecting idna<2.7,>=2.5 (from requests==2.18.4->mxnet)
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/27/cc/6dd9a3869f15c2edfab863b992838277279ce92663d334df9ecf5106f5c6/idna-2.6-py2.py3-none-any.whl (56kB)
    100% |████████████████████████████████| 61kB 7.2MB/s 
Installing collected packages: chardet, certifi, urllib3, idna, requests, graphviz, numpy, mxnet
  Found existing installation: chardet 2.2.1
    Uninstalling chardet-2.2.1:
      Successfully uninstalled chardet-2.2.1
Successfully installed certifi-2018.1.18 chardet-3.0.4 graphviz-0.8.1 idna-2.6 mxnet-1.1.0 numpy-1.13.3 requests-2.18.4 urllib3-1.22
[root@localhost icooper]# yum install graphviz
已加载插件:fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.cn99.com
 * updates: mirrors.zju.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 graphviz.x86_64.0.2.30.1-19.el7 将被 安装
--> 解决依赖关系完成

依赖关系解决

====================================================================================================================================================================
 Package                                架构                                 版本                                          源                                  大小
====================================================================================================================================================================
正在安装:
 graphviz                               x86_64                               2.30.1-19.el7                                 base                               1.3 M

事务概要
====================================================================================================================================================================
安装  1 软件包

总下载量:1.3 M
安装大小:3.8 M
Is this ok [y/d/N]: y
Downloading packages:
graphviz-2.30.1-19.el7.x86_64.rpm                                                                                                            | 1.3 MB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
  正在安装    : graphviz-2.30.1-19.el7.x86_64                                                                                                                   1/1 
  验证中      : graphviz-2.30.1-19.el7.x86_64                                                                                                                   1/1 

已安装:
  graphviz.x86_64 0:2.30.1-19.el7                                                                                                                                   

完毕!
[root@localhost icooper]# pip install graphviz
Requirement already satisfied: graphviz in /usr/lib/python2.7/site-packages
[root@localhost icooper]# pip install mxnet-mkl
Collecting mxnet-mkl
  Downloading mxnet_mkl-1.1.0-py2.py3-none-manylinux1_x86_64.whl (57.9MB)
    0% |▏                               | 317kB 67kB/s eta 0:14:13^C
Operation cancelled by user
[root@localhost icooper]# pip install -i https://pypi.tuna.tsingh^C
[root@localhost icooper]# 
[root@localhost icooper]# pip install -i https://pypi.tuna.tsinghua.edu.cn/simple mxnet-mkl
Collecting mxnet-mkl
  Downloading https://pypi.tuna.tsinghua.edu.cn/packages/cb/50/398a5aecda2c89bfb05d2524a9ca5ade12cb6573e3f39dcc808ab9ff2eb0/mxnet_mkl-1.1.0-py2.py3-none-manylinux1_x86_64.whl (57.9MB)
    100% |████████████████████████████████| 57.9MB 25kB/s 
Requirement already satisfied: requests==2.18.4 in /usr/lib/python2.7/site-packages (from mxnet-mkl)
Requirement already satisfied: graphviz==0.8.1 in /usr/lib/python2.7/site-packages (from mxnet-mkl)
Requirement already satisfied: numpy<=1.13.3 in /usr/lib64/python2.7/site-packages (from mxnet-mkl)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python2.7/site-packages (from requests==2.18.4->mxnet-mkl)
Requirement already satisfied: certifi>=2017.4.17 in /usr/lib/python2.7/site-packages (from requests==2.18.4->mxnet-mkl)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/lib/python2.7/site-packages (from requests==2.18.4->mxnet-mkl)
Requirement already satisfied: idna<2.7,>=2.5 in /usr/lib/python2.7/site-packages (from requests==2.18.4->mxnet-mkl)
Installing collected packages: mxnet-mkl
Successfully installed mxnet-mkl-1.1.0
[root@localhost icooper]# python
Python 2.7.5 (default, Nov 20 2015, 02:00:19) 
[GCC 4.8.5 20150623 (Red Hat 4.8.5-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import mxnet as mx
>>>  a = mx.nd.ones((2, 3))
  File "<stdin>", line 1
    a = mx.nd.ones((2, 3))
    ^
IndentationError: unexpected indent
>>> a = mx.nd.ones((2, 3))
>>> b = a * 2 + 1
>>> b.asnumpy()
array([[ 3.,  3.,  3.],
       [ 3.,  3.,  3.]], dtype=float32)
>>> 


---------------------------------
验证成功!

猜你喜欢

转载自blog.csdn.net/jobbofhe/article/details/79742830
今日推荐