分享

Ubuntu14.04 安装 tensorflow

 oskycar 2015-12-14

Ubuntu14.04安装tensorflow

谷歌开源了tensorflow深度学习框架,当然要学习一番

上tensorflow官网tensorflow.org学习一番安装流程,发现可以直接用pip安装

于是在虚拟机上装了Ubuntu14.04,按照官网给的步骤

# For CPU-only version
$ pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  • 1
  • 2

在ternimal里

$ sudo pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  • 1

然而提醒我python-pip没有安装

$ sudo apt-get install python-pip
  • 1

问题解决

再次运行

$ sudo pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  • 1

时出现类似这样的错误

ascii' codec can't decode byte 0xe5 in position 0: ordinal not in range(128)
  • 1

往上翻发现建议我安装python-dev,估计是python-dev没有安装的问题
于是

$ sudo apt-get install python-dev
$ pip install https://storage./tensorflow/linux/cpu/tensorflow-0.5.0-cp27-none-linux_x86_64.whl
  • 1
  • 2
  • 3

搞定,现在在python里可以import tensorflow

最后,血泪教训,centOS7装tensorflow比Ubuntu麻烦多了

    本站是提供个人知识管理的网络存储空间,所有内容均由用户发布,不代表本站观点。请注意甄别内容中的联系方式、诱导购买等信息,谨防诈骗。如发现有害或侵权内容,请点击一键举报。
    转藏 分享 献花(0

    0条评论

    发表

    请遵守用户 评论公约

    类似文章 更多