英文原版安装说明:
Installing withAnaconda
The Anaconda installation is communitysupported, not officially supported.
Take the following steps to installTensorFlow in an Anaconda environment:
- Follow the instructions on the Anaconda download site to download and install Anaconda.
- Create a conda environment named tensorflow by invoking the following command:
C:> conda create -n tensorflow python=3.5
- Activate the conda environment by issuing the following command:
- C:> activate tensorflow
(tensorflow)C:> # Your prompt should change
- 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,测试运行成功
本文提供了一步一步的指导,详细解释如何在Windows 10上利用Anaconda创建并激活名为'tensorflow'的环境,然后在该环境中安装CPU版本或GPU版本的TensorFlow。首先从Anaconda官网下载并安装Anaconda,接着通过conda命令创建环境,再激活环境,并使用pip安装TensorFlow。最后,验证TensorFlow安装是否成功,通过在Python交互式shell中导入TensorFlow并运行简单程序来检查安装效果。
440

被折叠的 条评论
为什么被折叠?



