安装tensorflow疯狂跳坑之路

2 篇文章 0 订阅
1 篇文章 0 订阅

安装tensorflow疯狂跳坑之路

https://blog.csdn.net/u011473714/article/details/80746362

安装anaconda

先安装anaconda第一个坑安装anaconda,官网下载一定会失败,当然如果你对自己的运气有信心当我没说,我们只有选择清华源下载https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

安装anaconda细节安装细节

https://blog.csdn.net/qq_39610888/article/details/80805356

分别输入anaconda和python显示如下则安装成功

 

 

安装tensorflow 

实现输入pip install tensorflow如下图

 

跳出bug

错误描述:No module named 'tensorflow'

 

你的电脑没有安装tensorflow

安装tensorflow:

 

cpu版本:pip install --ignore-installed --upgrade tensorflow

 

gpu版本:pip install --ignore-installed --upgrade tensorflow-gpu 注意gpu版先装好cuda以及cudnn

等待安装完成。

原文链接:https://blog.csdn.net/xavier_muse/article/details/83998744

错误描述:You are using pip version 19.0.3, however version 19.1.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.

上面的输入pip install --ignore-installed --upgrade tensorflow后很有可能出现bug  pip级别不够,也就是pip版本太老。升级pip

解决办法:直接运行 python -m pip install --upgrade pip 命令

原文链接:https://blog.csdn.net/wx13227855087/article/details/93754225

错误描述:输入pip install --ignore-installed --upgrade tensorflow运行失败

失败情况一:下载一点点就失败,请你寻找稳定的网络信号源,并且用管理员权限打开cmd。

失败情况二:下了一大堆然后说失败了

 

看下一条

错误描述:twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed.

安装版本太低升级PyHamcrest

输入pip install PyHamcrest

测试安装成功代码以及步骤

 

输入python

import tensorflow as tf

w = tf.Variable([[0.5,1.5]])

y = tf.Variable([[1.0],[2.0]])

x=tf.matmul(w,y)

print(x)

 

import tensorflow as tf

hello=tf.constant('hello,tensorflow!')

sess=tf.Session()

print(sess.run(hello))

成功输入pip install tensorflow

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值