版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/cheungmine/article/details/81225687
ubuntu18.04 server 安装 tensorflow cpu 记录
1) 下载安装 Anaconda2-5.2.0-Linux-x86_64.sh
安装位置:
/opt/anaconda2
2) 安装
# cd /opt/anaconda2/
# mkdir downloads
需要安装:
# ./bin/pip --cache-dir=./downloads --timeout=100000 --retries=999 install h5py==2.8.0rc1
否则报警告:
import tensorflow
/opt/anaconda2/lib/python2.7/site-packages/h5py/__init__.py:36: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In f uture, it will be treated as `np.float64 == np.dtype(float).type`.
from ._conv import register_converters as _register_converters
最后安装 tensorflow:
# ./bin/pip --cache-dir=./downloads --timeout=100000 --retries=999 install https://mirrors.tuna.tsinghua.edu.cn/tensorflow/linux/cpu/tensorflow-1.5.1-cp27-none-linux_x86_64.whl
必须安装 1.5.x 版本的,否则报错:
import tensorflow
Illegal instruction (core dumped)