zoukankan      html  css  js  c++  java
  • 利用Anaconda搭建TensorFlow环境并在Jupyter Notebook使用

    打开Anaconda Prompt


    创建一个tensorflow 虚拟环境:
    conda create -n tensorflow python=3.6

    激活tensorflow虚拟环境
    activate tensorflow

    查找当前可用的tensorflow包
    anaconda search -t conda tensorflow

     

     


    根据提示,查看一个包的详情信息
    anaconda show anaconda/tensorflow


    根据提示,copy命令安装tensorflow
    conda install –channel https://conda.anaconda.org/anaconda tensorflow

    查看环境,确认安装是否成功
    conda info –envs

    也可以测试一下
    python
    import tensorflow as tf
    hello = tf.constant("Hello tensorflow!")
    session = tf.Session()
    print(session.run(hello))
    至此,完成了tensorTensorFlow的安装,但是要在jupyter notebook中用的话还需要下面的操作

    jupyter中使用TensorFlow
    在激活TensorFlow之后安装ipython和jupyter

    (tensorflow)D:>conda install ipython
    ···
    (tensorflow)D:>conda install jupyter
    ···
    打开Jupyter notebook

    试试 import tensorflow as tf

    来源:CSDN
    原文:https://blog.csdn.net/weixin_41043240/article/details/79519118

  • 相关阅读:
    except与besides
    think用法
    walk用法
    complain用法
    go through用法
    herd用法
    ridiculous用法
    it is the same as用法
    let us say用法
    1002 A+B for Polynomials (25 分)(模拟)
  • 原文地址:https://www.cnblogs.com/USTC-ZCC/p/10539661.html
Copyright © 2011-2022 走看看