ubuntu+anaconda3+tensorflow installation

It's true that every machine has its own temper, and it keeps making mistakes according to the online tutorials. . . . . I have been submitting tutorials online, looking for ways to solve the problem, and finally, it is installed.
1 According to anaconda3, it is no longer written here, mainly according to tensorflow
2 Open the terminal and change the source (faster)
enter
conda config -- add channels https://mirrors .tuna .tsinghua .edu .cn /anaconda/pkgs/main/
conda config --
add channels https://mirrors .tuna .tsinghua .edu .cn /anaconda/pkgs/free/
conda config --
set show_channel_urls yes
3 Create an environment called flappbird (you can replace it with your own, it was installed with reference to a tutorial on the Internet, generally named tensorflow)
conda create -n flappbird python = 3.6

4 Activate the environment
source activate flappbird
5 Install tensorflow
conda install -n flappbird -c https: //conda.anaconda.org/jjhelmus tensorflow
6 Reopen the terminal
activation environment

source activate flappbird
7 Enter the python environment

8 enter
import tensorflow as tf
hello = tf.constant(
'Hello, TensorFlow!' )
sess = tf.Session()
print(sess.run(hello))
success


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324933760&siteId=291194637