ubuntu14.04 + anaconda3-5 + ipython notebook + tensorflow安装

1.安装 anaconda3-5

           在清华大学开源的镜像网站上下载 anaconda3-5,比从官网上下载快很多。

清华大学开源镜像


          安装完成后,将 {HOME}/anaconda3/bin添加到PATH中; {HOME}/anaconda3/lib 添加到LD_LIBRARY_PATH中。


2. 安装 ipython notebook

          现在系统中共存着python2.7和python3.5两套pyhton版本,并且都添加到的系统的搜索路径中。若使用pip install jupyter 的命令安装,系统会默认使用python2.7的pip进行安装,会报错 --- 提示需要升级pip(pyhton2.7不兼容ipython notebook)。


          我的做法是改变pyhton2.7文件夹的名字(将/usr/local/lib/python2.7 改为 /usr/local/lib/python2.7_),系统找不到python2.7便会调用python3.5的pip进行安装。

pip install jupyter

        完成 ipython notebook的安装,在终端输入ipython notebook便可以愉快的使用了。


3. 安装tensorflow

        在Anaconda的仓库中搜索可用的tensorflow的版本: 

anaconda search -t conda tensorflow
Using Anaconda API: https://api.anaconda.org
Packages:
     Name                      |  Version | Package Types   | Platforms       | Builds    
     ------------------------- |   ------ | --------------- | --------------- | ----------
     GlaxoSmithKline/tensorflow |   0.12.0 | conda           | linux-64        | py27hb0d0e74_0
                                          : TensorFlow is a machine learning library
     HCC/tensorflow            |    1.4.0 | conda           | linux-64        | py34_1, py27_1, py27_0, py36_0, py35_0, py35_1
                                          : Computation using data flow graphs for scalable machine learning.
     HCC/tensorflow-cpucompat  |    1.4.0 | conda           | linux-64        | py36_0, py27_0, py35_0, py34_0
                                          : Computation using data flow graphs for scalable machine learning.
     HCC/tensorflow-fma        |    1.4.0 | conda           | linux-64        | py27_1, py34_1, py27_0, py36_0, py34_0, py35_0, py35_1
                                          : Computation using data flow graphs for scalable machine learning.
     SentientPrime/tensorflow  |    0.6.0 | conda           | osx-64          | py27_0    
                                          : TensorFlow helps the tensors flow
     SmartAg/tensorflow_gpu    |    1.0.1 | conda           | linux-aarch64   | 0         
     aaronzs/tensorflow        |    1.4.0 | conda           | linux-64, win-64, osx-64 | py36h39705f4_0, py36h8a03e48_0, py35hc784f49_0, py36h6db853c_0, py35h2d7a08b_0, py35h1150644_0, py35h5a8cc8b_0, py35hc0f5839_0, py36hebc11a6_0, py35ha700c16_0, py36hf8f6b73_0, py36heb185b1_0, py35hf9a0815_0, py36h2003710_0, py36h4df9c7b_0, py35h6467dd0_0, py36hd42d972_0, py36he4e0f4f_0, py35h89e3332_0
                                          : TensorFlow helps the tensors flow
     aaronzs/tensorflow-gpu    |    1.4.0 | conda           | linux-64, win-64 | py35h95763ad_0, py36h03e8729_0, py35h8ac8084_0, py35hb2e3085_0, py35hc6fb95a_0, py36ha20c466_0, py35h3b8745f_0, py36hbec5d8f_0, py36h74c31d8_0, py36h6bf4e57_0, py36h7b11560_0, py35h14e71af_0, py36h559dc3e_0
                                          : TensorFlow helps the tensors flow
     aaronzs/tensorflow-tensorboard | 0.4.0rc3 | conda           | linux-64, osx-64, win-64 | py35h30a7cae_0, py36h1eb756b_0, py35h8792995_0, py35h98b1d99_0, py36hbb25e9c_0, py35h0e1fd4a_0, py36h7c6d2df_0, py35h6181586_0, py36h1ee23b2_0, py36hffc986b_0, py35h85b20a5_0, py35h93bdf65_0, py36h4568b58_0, py36h5698cb7_0, py35h985ceb1_0, py35h83d8c28_0, py36hf2576c0_0, py36h52f5384_0, py36h9271151_0, py36ha443a3c_0, py35hbab8bba_0, py35h14ff132_0, py36h9a29024_0, py35h9958e77_0, py36h662c838_0, py36hd60226d_0
                                          : TensorBoard lets you watch Tensors Flow
     acellera/tensorflow-cuda  |   0.12.1 | conda           | linux-64        | 1         
     anaconda/tensorflow       |    1.4.1 | conda           | linux-ppc64le, linux-64, osx-64, win-64 | np111py27_0, 0, np111py34_0, py36_0, np112py36_0, py27_0, np112py35_0, np111py36_0, py35_0, np112py27_0, np111py35_0
                                          : TensorFlow is a machine learning library.   

        选择一个版本“jjhelmus/tensorflow-gpu”   查询版本信息:

anaconda show jjh_cio_testing/tensorflow-gpu
Using Anaconda API: https://api.anaconda.org
Name:    tensorflow-gpu
Summary: TensorFlow is a machine learning library.
Access:  public
Package Types:  conda
Versions:
   + 1.0.1
   + 1.1.0
   + 1.2.1
   + 1.3.0
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

        最后输入:

import tensorflow as tf

        查看是否安装成功

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值