ubuntu 64位 + tensorflow(cpu)之pip安装

Tensorflow:

TensorFlow是谷歌基于DistBelief进行研发的第二代人工智能学习系统,主要是深度神经网络模型。

安装配置:

因为不支持Windows系统,只能在Mac或Linux上使用,因此Windows系统可以装个VM虚拟机。
官网是提供了pip, Docker, Virtualenv, Anaconda 等多种方法安装TensorFlow,但是我只走了pip这一条路。
本人使用的是Ubuntu 64位版本,没有多少坑,直接跟着官网走就行(比以前搞得Xamarin,RN之类的要顺畅不知道多少倍),顺心不少。

0.8.0版本:
安装pip
python2.7版本:
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit  
  2. $ sudo apt-get install python-pip python-dev  
python3.4版本:
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit  
  2. $ sudo apt-get install python3-pip python3-dev  

安装TensorFlow
python2.7版本:
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit, CPU only, Python 2.7:  
  2. $ sudo pip install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp27-none-linux_x86_64.whl  
python3.4版本:
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit, CPU only, Python 3.4:  
  2. $ sudo pip3 install --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.8.0-cp34-cp34m-linux_x86_64.whl  

0.11.0rc1版本:
安装pip和0.8.0版本一样,就不赘述了。

安装TensorFlow
python2.7
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit, CPU only, Python 2.7  
  2. $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp27-none-linux_x86_64.whl  
python3.4
# Ubuntu/Linux 64-bit, CPU only, Python 3.4
$ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp34-cp34m-linux_x86_64.whl
python3.5
[html]  view plain  copy
  1. # Ubuntu/Linux 64-bit, CPU only, Python 3.5  
  2. $ export TF_BINARY_URL=https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.11.0rc1-cp35-cp35m-linux_x86_64.whl  
最后统一调用
[html]  view plain  copy
  1. # Python 2  
  2. $ sudo pip install --upgrade $TF_BINARY_URL  
  3.   
  4. # Python 3  
  5. $ sudo pip3 install --upgrade $TF_BINARY_URL  

注意:

1.以上皆为CPU only版本,TensorFlow可以使用GPU启用版本为其运算加速,但我使用了VM虚拟机,又是GTX1070最新显卡,鬼知道会出什么岔子,因此没有用。
2.极客学院只针对了0.8.0版本进行翻译,没有之后版本的。
3.Ubuntu本身自带python3.5.2和2.7版本,不需要另行安装。
4.3Python3.5版本的TensorFlow至少0.9.0版本。
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值