转载请注明出处:http://www.cnblogs.com/willnote/p/6746499.html

Anaconda安装

清华大学 TUNA 镜像源选择对应的操作系统与所需的Python版本下载Anaconda安装包。Windows环境下的安装包直接执行.exe文件进行安装即可,Ubuntu环境下在终端执行

$ bash Anaconda2-4.3.1-Linux-x86_64.sh   #Python 2.7版本

或者

$ bash Anaconda3-4.3.1-Linux-x86_64.sh  #Python 3.5 版本

在安装的过程中,会询问安装路径,按回车即可。之后会询问是否将Anaconda安装路径加入到环境变量(.bashrc)中,输入yes,这样以后在终端中输入python即可直接进入Anaconda的Python版本(如果你的系统中之前安装过Python,自行选择yes or no)。安装成功后,会有当前用户根目录下生成一个anaconda2的文件夹,里面就是安装好的内容

查询安装信息

$ conda info

查询当前已经安装的库

$ conda list

安装库(***代表库名称)

$ conda install ***

更新库

 $ conda update ***

Anaconda仓库镜像

官方下载更新工具包的速度很慢,所以继续添加清华大学 TUNA提供的Anaconda仓库镜像,在终端或cmd中输入如下命令进行添加

$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
$ conda config --set show_channel_urls yes $ conda install numpy #测试是否添加成功

之后会自动在用户根目录生成“.condarc”文件,Ubuntu环境下路径为~/.condarc,Windows环境下路径为C:\用户\your_user_name\.condarc

channels:
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
- defaults
show_channel_urls: yes

如果要删除镜像,直接删除“.condarc”文件即可

Tensorflow安装

在终端或cmd中输入以下命令搜索当前可用的tensorflow版本

$ anaconda search -t conda tensorflow

Using Anaconda API: https://api.anaconda.org
Run 'anaconda show <USER/PACKAGE>' to get more details:
Packages:
Name | Version | Package Types | Platforms
------------------------- | ------ | --------------- | ---------------
HCC/tensorflow | 1.0.0 | conda | linux-64
HCC/tensorflow-cpucompat | 1.0.0 | conda | linux-64
HCC/tensorflow-fma | 1.0.0 | conda | linux-64
SentientPrime/tensorflow | 0.6.0 | conda | osx-64
: TensorFlow helps the tensors flow
acellera/tensorflow-cuda | 0.12.1 | conda | linux-64
anaconda/tensorflow | 1.0.1 | conda | linux-64
anaconda/tensorflow-gpu | 1.0.1 | conda | linux-64
conda-forge/tensorflow | 1.0.0 | conda | linux-64, win-64, osx-64
: TensorFlow helps the tensors flow
creditx/tensorflow | 0.9.0 | conda | linux-64
: TensorFlow helps the tensors flow
derickl/tensorflow | 0.12.1 | conda | osx-64
dhirschfeld/tensorflow | 0.12.0rc0 | conda | win-64
dseuss/tensorflow | | conda | osx-64
guyanhua/tensorflow | 1.0.0 | conda | linux-64
ijstokes/tensorflow | 2017.03.03.1349 | conda, ipynb | linux-64
jjh_cio_testing/tensorflow | 1.0.1 | conda | linux-64
jjh_cio_testing/tensorflow-gpu | 1.0.1 | conda | linux-64
jjh_ppc64le/tensorflow | 1.0.1 | conda | linux-ppc64le
jjh_ppc64le/tensorflow-gpu | 1.0.1 | conda | linux-ppc64le
jjhelmus/tensorflow | 0.12.0rc0 | conda, pypi | linux-64, osx-64
: TensorFlow helps the tensors flow
jjhelmus/tensorflow-gpu | 1.0.1 | conda | linux-64
kevin-keraudren/tensorflow | 0.9.0 | conda | linux-64
lcls-rhel7/tensorflow | 0.12.1 | conda | linux-64
marta-sd/tensorflow | 1.0.1 | conda | linux-64
: TensorFlow helps the tensors flow
memex/tensorflow | 0.5.0 | conda | linux-64, osx-64
: TensorFlow helps the tensors flow
mhworth/tensorflow | 0.7.1 | conda | osx-64
: TensorFlow helps the tensors flow
miovision/tensorflow | 0.10.0.gpu | conda | linux-64, osx-64
msarahan/tensorflow | 1.0.0rc2 | conda | linux-64
mutirri/tensorflow | 0.10.0rc0 | conda | linux-64
mwojcikowski/tensorflow | 1.0.1 | conda | linux-64
rdonnelly/tensorflow | 0.9.0 | conda | linux-64
rdonnellyr/r-tensorflow | 0.4.0 | conda | osx-64
test_org_002/tensorflow | 0.10.0rc0 | conda |
Found 32 packages

选择一个较新的CPU或GPU版本,如jjh_cio_testing/tensorflow-gpu的1.0.1版本,输入如下命令查询安装命令

$ anaconda show jjh_cio_testing/tensorflow-gpu

Using Anaconda API: https://api.anaconda.org
Name: tensorflow-gpu
Summary:
Access: public
Package Types: conda
Versions:
+ 1.0.1 To install this package with conda run:
conda install --channel https://conda.anaconda.org/jjh_cio_testing tensorflow-gpu

使用最后一行的提示命令进行安装

$ conda install --channel https://conda.anaconda.org/jjh_cio_testing tensorflow-gpu

Fetching package metadata .............
Solving package specifications: . Package plan for installation in environment /home/will/anaconda2: The following packages will be SUPERSEDED by a higher-priority channel: tensorflow-gpu: 1.0.1-py27_4 https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free --> 1.0.1-py27_4 jjh_cio_testing Proceed ([y]/n)?

conda会自动检测安装此版本的Tensorflow所依赖的库,如果你的Anaconda缺少这些依赖库,会提示你安装。因为我之前已经安装过了,所以这里只提示我安装Tensorflow。输入y并回车之后等待安装结束即可

  • 可以选择次高版本的Tensorflow安装,因为最新版本可能清华 TUNA的仓库镜像库没有及时更新,而官方更新连接总是失败,我最开始选择了jjhelmus/tensorflow-gpu的1.0.1版本,其他依赖库清华 TUNA的仓库镜像有资源,而到最后jjhelmus/tensorflow-gpu版本的Tensorflow安装包总是下载不下来,尝试20多次之后换了一个1.0.0的版本,终于顺利安装成功

进入python,输入

import tensorflow as tf

如果没有报错说明安装成功。

参考

  1. Anaconda 镜像使用帮助
  2. tensorflow学习笔记一:安装调试

Anaconda+Tensorflow环境安装与配置的更多相关文章

  1. Anaconda+Tensorflow环境安装与配置(转载)

    Anaconda+Tensorflow环境安装与配置 转载请注明出处:http://www.cnblogs.com/willnote/p/6746499.html Anaconda安装 在清华大学 T ...

  2. 基于深度学习的人脸识别系统Win10 环境安装与配置(python+opencv+tensorflow)

    一.需要下载的软件.环境及文件 (由于之前见识短浅,对Anaconda这个工具不了解,所以需要对安装过程做出改变:就是Python3.7.2的下载安装是可选的,因为Anaconda已经为我们解决Pyt ...

  3. tensorflow环境安装

    tensorflow环境安装1.安装虚拟机Virtrualbox下载地址:https://www.virtualbox.org/wiki/Downloads 2.下载安装Ubuntu镜像下载地址:ht ...

  4. 第1章 开发环境安装和配置(二)安装JDK、SDK、NDK

    原文 第1章 开发环境安装和配置(二)安装JDK.SDK.NDK 无论是用C#和VS2015开发Androd App还是用Java和Eclipse开发Androd App,都需要先安装JDK和Andr ...

  5. Nginx+Python+uwsgi+Django的web开发环境安装及配置

    Nginx+Python+uwsgi+Django的web开发环境安装及配置 nginx安装 nginx的安装这里就略过了... python安装 通常系统已经自带了,这里也略过 uwsgi安装 官网 ...

  6. RabbitMQ消息队列之一:RabbitMQ的环境安装及配置

    RabbitMQ简介: MQ全称为Message Queue, 消息队列(MQ)是一种应用程序对应用程序的通信方法.应用程序通过读写出入队列的消息(针对应用程序的数据)来通信,而无需专用连接来链接它们 ...

  7. AndroidStudio环境安装与配置

    前言 大家好,给大家带来AndroidStudio环境安装与配置的概述,希望你们喜欢 AndroidStudio IDE下载 我们选择用Android Studio开发Android的App,Andr ...

  8. android环境安装及配置

    直接从网上下载适合当前系统的jdk(eclipse需要一个java虚拟器的环境) 直接从android上下载最新的adt-bundle-windows-x86(64)-xxxxxx.zip(集成好的e ...

  9. Tomcat(64位)免安装版的环境安装与配置

    本篇博客主要介绍Tomcat(64位)免安装版的环境安装与配置,该篇文章同样适合于32位Tomcat免安装版的环境安装与配置. 该篇博客中的大部分内容同百度经验中的<出现unable to op ...

随机推荐

  1. P3226 [HNOI2012]集合选数

    考虑构造矩阵 1 3 9 27...... 2 6 18 54...... 4 12 36 108...... ...... 发现在这个矩阵上一个合法的集合是一个满足选择的数字不相邻的集合,由于行数列 ...

  2. Java字符串 API

    常用API

  3. C++中的赋值运算符重载函数(operator=)

    MyStr& operator =(const MyStr& str)//赋值运算符 { cout << "operator =" << e ...

  4. Css的向左浮动、先右浮动、绝对定位、相对定位的简单使用

    1.div层的浮动 1)div向左浮动.向右浮动 <!doctype html> <html> <head> <meta charset="utf- ...

  5. UVALive 4764 dp

    DES: 这是一个新的游戏.给你一套牌.编号从1到100000.正常来说.你手中的牌和这次翻的牌是一样的,就会加一分.但是.如果是999的话.加三分.所以问你最大的分是多少. 貌似是简单的DP吧.(D ...

  6. html-中文字体在CSS中的显示(Unicode编码)(转载)

    为了方便需要的朋友快速使用,下表中列出了一些常用中文字体的Unicode编码: 宋体                   SimSun     \5B8B\4F53黑体                ...

  7. (C#基础)反射理解

    这个知识点很基础. 代码 using System; using System.Collections.Generic; using System.Linq; using System.Text; n ...

  8. 一、WCF学习之旅-创建第一个服务

    WCF基本介绍:http://baike.baidu.com/link?url=TGjLYt3HS4dt4-hIiGRknLy6udRsZ52QxJz9cmRKlR4NXbP9rCZDsKn2fDfG ...

  9. 使用Jenkins自动编译我的.net 项目

    1.Jenkins是什么? Jenkins是一个可扩展的持续集成的引擎,主要用于持续自动的构建.测试软件项目 监控一些定时执行的任务.   2.安装配置 最新的Jenkins 安装包可以从这里下载:h ...

  10. python爬虫常见面试题(二)

    前言 之所以在这里写下python爬虫常见面试题及解答,一是用作笔记,方便日后回忆:二是给自己一个和大家交流的机会,互相学习.进步,希望不正之处大家能给予指正:三是我也是互联网寒潮下岗的那批人之一,为 ...