首页 > 学院 > 开发设计 > 正文

ubuntu14.04系统中安装tensorflow(cpu版)

2019-11-06 06:15:06
字体:
来源:转载
供稿:网友

第一步:安装pip工具

sudo apt-get install python-pip

第二步:安装tensorflow-cpu版

sudo pip install https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-0.9.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

第三步:打开sublime-text3 使用SFTP连接Ubuntu系统出现如下错误

The SSH host key has changed. This could indicate a potential security breach, or that the domain you are connecting to recently moved servers.If you are confident this is not a security breach you can delete the old host key and try again. 1. Win XP: Start > Run > regedit.exe    Win Vista/7: Start > regedit 2. Expand to HKEY_CURRENT_USER/Software/SimonTatham/PuTTY/SshHostKeys and delete the entry including @22:10.0.83.202

打开windows7下按步骤打开并删除相应记录

第四步:linux上测试tensor测试文件

test.py

import numpyimport tensorflow as tfhello = tf.constant("hello,tensorflow")sess = tf.session()PRint sess.run(hello)a = tf.constant(10)b = tf.constant(20)print sess.run(a+b)

linux安装anaconda2 下载地址:https://repo.continuum.io/archive/index.html  安装到/root/anaconda2中

或者指令:sudo apt-get install python-dev 软件后在安装numpy   指令:sudo apt-get install python-numpy


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表