TensorFlow——快速安装

TensorFlow:2015年Google开源的机器学习框架
1、Anoconda安装
(1)Window,MacOS,Linux都已支持Tensorflow。
(2)
Window用户只能使用
python3.5
(64bit)
。MacOS,Linux支持python2.7和python3.3+。
(3)有GPU可以安装带GPU版本的,没有GPU就安装CPU版本的。
推荐安装Anaconda,pip版本大于8.1
Anoconda官网:
https://www.anaconda.com/
Anaconda版本下载:
https://repo.continuum.io/archive/

python3.5(64bit对应的是Anaconda3-4.2.0版本,如下)

《TensorFlow——快速安装》


:更新pip版本:
管理员
方式打开命令提示符,输入命令:
python -m pip install –upgrade pip

《TensorFlow——快速安装》

2、Windows安装Tensorflow
(1) Windows安装Tensorflow
CPU版本:
管理员
方式打开命令提示符,输入命令:
pip install tensorflow
GPU版本:
管理员方式打开命令提示符,输入命令:
pip install tensorflow-gpu

《TensorFlow——快速安装》

(2) Windows更新Tensorflow
先卸载

pip uninstall tensorflow
再安装

pip install tensorflow
注:
【安装完成后,打开Anoconda自带的Jupyter Notebook,输入
import tensorflow
,运行(
shift+Enter
),如果不缺少文件的话就运行成功,如果缺少文件则根据错误提示安装文件。
例如:出现如下错误,则点击下面的链接,根据提示安装即可
ImportError
: Could not find ‘cudart64_90.dll’. TensorFlow requires that this DLL be installed in a directory that is named in your %PATH% environment variable. Download and install CUDA 9.0 from this URL:
https://developer.nvidia.com/cuda-toolkit

3、Linux和MacOS安装Tensorflow
CPU版本:
Python 2.7用户:
pip install tensorflow
Python3.3+用户:
pip3 install tensorflow
GPU版本:
Python 2.7用户:
pip install tensorflow-gpu
Python3.3+用户:
pip3 install tensorflow-gpu

官方网站:
https://www.tensorflow.org/ 
官方GitHub仓库:
https://github.com/tensorflow/tensorflow
 
官方文档:
https://www.tensorflow.org/get_started/
 
官方文档中文版:
https://github.com/jikexueyuanwiki/tensorflow-zh
 
TensorFlow 中文社区
http://www.tensorfly.cn/




    原文作者:TensorFlow
    原文地址: https://yq.aliyun.com/articles/604782
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞