Installing tensorflow with anaconda in windows

前端 未结 20 2253
春和景丽
春和景丽 2020-12-08 02:15

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

20条回答
  •  囚心锁ツ
    2020-12-08 03:17

    This worked for me:

    conda create -n tensorflow python=3.5
    activate tensorflow
    conda install -c conda-forge tensorflow
    

    Open Anaconda Navigator.

    Change the dropdown of "Applications on" from "root" to "tensorflow"

    see screenshot

    Launch Spyder

    Run a little code to validate you're good to go:

    import tensorflow as tf
    node1 = tf.constant(3, tf.float32)
    node2 = tf.constant(4) # also tf.float32 implicitly
    print(node1, node2)
    

    or

    hello = tf.constant('Hello, TensorFlow!')
    sess = tf.Session()
    print(sess.run(hello))
    

提交回复
热议问题