安装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