安装tensorflow1.0
时间: 2023-11-18 22:54:49 浏览: 125
安装TensorFlow 1.0有两种方法,一种是使用pip安装,另一种是使用Anaconda安装。以下是使用Anaconda安装TensorFlow 1.0的步骤:
1. 下载Anaconda并安装。
2. 打开终端或命令行窗口,输入以下命令更换Anaconda源:
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
3. 创建一个名为tensorflow的环境,并指定Python版本为3.4.0:
conda create -n tensorflow python=3.4.0
4. 激活tensorflow环境:
source activate tensorflow
5. 安装TensorFlow 1.0:
pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.0.0-cp34-cp34m-linux_x86_64.whl
6. 检验安装是否成功:
python
>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
>>> print(sess.run(hello))
请注意,以上步骤仅适用于Linux系统。如果您使用的是其他操作系统,请参考TensorFlow官方文档进行安装。
阅读全文
相关推荐














