红联Linux门户
Linux帮助

Ubuntu14.04安装tensorflow

发布时间:2016-03-15 14:02:07来源:红联作者:sxjcsxm
Ubuntu14.04安装tensorflow
上tensorflow官网tensorflow.org学习一番安装流程,发现可以直接用pip安装
Ubuntu14.04,按照官网给的步骤
# For CPU-only version
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl

在终端里输入:
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
然而提醒我python-pip没有安装
$ sudo apt-get install python-pip
问题解决
再次运行
$ sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
时出现类似这样的错误
ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
往上翻发现建议我安装python-dev,估计是python-dev没有安装的问题 于是
$ sudo apt-get install python-dev
$ pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
搞定,现在在python里可以import tensorflow了,前提需要安装python!
文章评论

共有 1 条评论

  1. aiwoderen 于 2016-03-15 16:28:42发表:

    好强的思路