Ubuntu16.04安装TensorFlow 1.2.0
2017-05-29 14:07
309 查看
环境:Ubuntu16.04(64位)
Python2.7
一定要是64位系统,TensorFlow不支持32位!
参考官方的文档,我选择基于virtualenv安装,下面是步骤:
1.下载TensorFlow的whl文件,根据自己的实际环境来,我对应的是tensorflow-1.2.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
2.安装必备的工具;
3.安装好以后,新建一个virtualenv环境;
4.激活virtualenv环境
成功执行后命令行前面多了个” (tensorflow) ”
5.安装TensorFlow
安装tensorflow时候要保持联网,虽然这个包已经下载好了,但是他还会下载一些依赖,讲道理的说numpy也会自动下载,但是为了确保,我首先手动把他安装了。(如果你没有改pip镜像源的话,在下载依赖时候可能报错http请求超时错误,可以选择重试几次,或者直接修改你的镜像源,改成国内的,这方面网上帖子很多。我就不赘述了)。
6.完成。
声明:我最终成功的版本是在Ubuntu下新建了一个Python的virtualenv,然后在虚拟环境安装成功的。直接安装的二进制文件。所以这样安装后运行时可能会有警告
这是我的提示信息,’ w ‘是warning的意思,同理,’ E ‘就是error。这堆警告大概就是说我没有编译SSE、AVX、FMA(这三个都是指令集),但是我的电脑支持这些指令集,如果我编译这些指令集可以提高运行速度。网上度了一下说如果编译这些指令集的话速度可以提升近一倍。
补充:如果准备编译安装(为了使用FMA、SSE等指令集),不推荐在虚拟机中编译,或者分配资源多一些试试,我分配1.6G编译直接卡死
Python2.7
一定要是64位系统,TensorFlow不支持32位!
参考官方的文档,我选择基于virtualenv安装,下面是步骤:
1.下载TensorFlow的whl文件,根据自己的实际环境来,我对应的是tensorflow-1.2.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
2.安装必备的工具;
sudo apt-get install python-pip python-dev python-virtualenv
3.安装好以后,新建一个virtualenv环境;
virtualenv --system-site-packages ~/tensorflow #路径自己定义,我的是 ~/tensorFlow cd ~/tensorflow #进入tensorFlow目录
4.激活virtualenv环境
source bin/activate
成功执行后命令行前面多了个” (tensorflow) ”
5.安装TensorFlow
pip install numpy #我有点方,所以先装个numpy pip install tensorflow-1.2.0rc1-cp27-cp27mu-manylinux1_x86_64.whl
安装tensorflow时候要保持联网,虽然这个包已经下载好了,但是他还会下载一些依赖,讲道理的说numpy也会自动下载,但是为了确保,我首先手动把他安装了。(如果你没有改pip镜像源的话,在下载依赖时候可能报错http请求超时错误,可以选择重试几次,或者直接修改你的镜像源,改成国内的,这方面网上帖子很多。我就不赘述了)。
6.完成。
声明:我最终成功的版本是在Ubuntu下新建了一个Python的virtualenv,然后在虚拟环境安装成功的。直接安装的二进制文件。所以这样安装后运行时可能会有警告
2017-05-29 13:16:36.255629: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.1 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 13:16:36.256148: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use SSE4.2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 13:16:36.256570: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 13:16:36.256695: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use AVX2 instructions, but these are available on your machine and could speed up CPU computations. 2017-05-29 13:16:36.256765: W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't compiled to use FMA instructions, but these are available on your machine and could speed up CPU computations.
这是我的提示信息,’ w ‘是warning的意思,同理,’ E ‘就是error。这堆警告大概就是说我没有编译SSE、AVX、FMA(这三个都是指令集),但是我的电脑支持这些指令集,如果我编译这些指令集可以提高运行速度。网上度了一下说如果编译这些指令集的话速度可以提升近一倍。
补充:如果准备编译安装(为了使用FMA、SSE等指令集),不推荐在虚拟机中编译,或者分配资源多一些试试,我分配1.6G编译直接卡死
相关文章推荐
- tensorflow 1.2.0 cuda8.0 cudnn5.0 ubuntu16.04 安装
- 如何正确的用VMWare在Ubuntu16.04环境下安装基于TensorFlow的Magenta
- 记录我在Ubuntu16.04下安装TensorFlow的经历
- tensorflow学习笔记十一:ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程
- Ubuntu16.04+Anaconda 安装GPU版本tensorflow
- 初用Linux, 安装Ubuntu16.04+NVIDIA387+CUDA8.0+cudnn5.1+TensorFlow1.0.1
- 在ubuntu16.04(cpu)上安装tensorflow
- Ubuntu 16.04+Gtx1050Ti+cuda 8.0+cudnn 5.1 tensorflow 安装
- TensorFlow的安装以及环境配置(ubuntu16.04+1070+Anaconda)
- 在Ubuntu16.04下安装TensorFlow
- ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程
- ubuntu16.04下安装TensorFlow(GPU加速)----详细图文教程
- ubuntu16.04下安装CUDA,cuDNN及tensorflow-gpu版本过程
- I7-7700K+Z270+Ubuntu16.04+1080+tensorflow安装
- [置顶] Ubuntu16.04下安装tensorflow并配置GPU
- ubuntu16.04下的tensorflow源码安装,踩坑&填坑记录[ubuntu16.04+GTX960+CUDA8.0+cuDNN5.1.5]
- 【转】Ubuntu 16.04安装配置TensorFlow GPU版本
- 64位ubuntu16.04安装tensorflow的方方面面
- 初用Linux, 安装Ubuntu16.04+NVIDIA387+CUDA8.0+cudnn5.1+TensorFlow1.0.1
- ubuntu 16.04 安装TensorFlow GPU版本