在 Windows 中使用 anaconda 安装 tensorflow [英] Installing tensorflow with anaconda in windows
问题描述
我已经在 Windows 64 位上安装了 Anaconda.我已经下载了用于创建项目的 PyCharm,并在 PyCharm 的终端中使用以下命令安装了 numpy
、scipy
、matplotlib
:>
I have installed Anaconda on Windows 64 bit. I have downloaded PyCharm for creating a project and in the terminal of PyCharm I have installed numpy
, scipy
, matplotlib
using the following commands:
conda install numpy
conda install scipy
conda install matplotlib
我无法像安装其他软件包那样安装 Tensorflow.我应该如何安装它?
I am not able to install Tensorflow in the same way I installed these other packages. How should I install it?
推荐答案
Google 最近推出了更新版本的 Tesnsorflow r0.12,其中包括对 Windows 的支持,现在可以使用 Python >=3.5 安装 CPU 和 GPU 版本.2(仅 64 位)版本.
Google has recently launched a newer version of Tesnsorflow r0.12 which include support of Windows both CPU and GPU version can now be installed using Python >=3.5.2 (only 64-bit) version.
对于仅 CPU 版本打开命令提示符并输入以下命令
For CPU only version open command prompt and enter follow command
pip install --upgrade https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow-0.12.0rc0-cp35-cp35m-win_amd64.whl
按照此Windows 上的 Tensorflow 获取分步说明.
Follow this Tensorflow on Windows for step by step instructions.
更新
要安装当前最新版本,请运行以下命令:
To install current latest version please run following command:
pip install tensorflow #CPU only
pip install tensorflow-gpu #For GPU support
2020 年更新
Tensorflow 2.0 现在为 CPU 和 GPU 版本提供了一个包,只需运行
Tensorflow 2.0 now has a single package for both CPU and GPU version, simply run
pip install tensorflow
如果您使用的是 Anaconda,您可以通过运行以下命令安装 Tensorflow GPU 版本及其所有依赖项(CUDA、cuDNN):
If your're using Anaconda you can install Tensorflow GPU version and all of its dependencies (CUDA, cuDNN) by running:
conda install -c tensorflow-gpu
这篇关于在 Windows 中使用 anaconda 安装 tensorflow的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!