win10+CPU,tensorflow的安装(通过anaconda)

本文提供了一步一步的指导,详细解释如何在Windows 10上利用Anaconda创建并激活名为'tensorflow'的环境,然后在该环境中安装CPU版本或GPU版本的TensorFlow。首先从Anaconda官网下载并安装Anaconda,接着通过conda命令创建环境,再激活环境,并使用pip安装TensorFlow。最后,验证TensorFlow安装是否成功,通过在Python交互式shell中导入TensorFlow并运行简单程序来检查安装效果。
摘要由CSDN通过智能技术生成

英文原版安装说明:

Installing withAnaconda

The Anaconda installation is communitysupported, not officially supported.

Take the following steps to installTensorFlow in an Anaconda environment:

  1. Follow the instructions on the Anaconda download site to download and install Anaconda.
  2. Create a conda environment named tensorflow by invoking the following command:

C:> conda create -n tensorflow python=3.5

  1. Activate the conda environment by issuing the following command:
  2. C:> activate tensorflow

 (tensorflow)C:>  # Your prompt should change

  1. Issue the appropriate command to install TensorFlow inside your conda environment. To install the CPU-only version of TensorFlow, enter the following command:

(tensorflow)C:> pip install --ignore-installed --upgrade tensorflow

To install the GPU version ofTensorFlow, enter the following command (on a single line):

(tensorflow)C:> pip install --ignore-installed --upgradetensorflow-gpu

Validate yourinstallation

Start a terminal.

If you installed through Anaconda,activate your Anaconda environment.

Invoke python from your shell asfollows:

 实际操作:

1.    安装ANACONDA


2.    点击anaconda prompt依次输入命令“”

1.    C:>conda create -n tensorflow python=3.5

2.    C:>activate tensorflow

 (tensorflow)C:>  # Your prompt should change

3.     (tensorflow)C:> pip install--ignore-installed --upgrade tensorflow


 

 

验证测试 英文说明

Validate yourinstallation

Start a terminal.

If you installed through Anaconda,activate your Anaconda environment.

Invoke python from your shell asfollows:

$ python

Enter the following short program insidethe python interactive shell:

>>> importtensorflow as tf
>>> hello = tf.constant(
'Hello, TensorFlow!')
>>> sess = tf.
Session()
>>>
print(sess.run(hello))

If the system outputs the following,then you are ready to begin writing TensorFlow programs:

Hello, TensorFlow!

If you are new to TensorFlow, see Getting Started with TensorFlow.

 

 

 

 实际测试

4.打开jupyter,测试运行成功


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值