conda create --name tensorflow36 python=3.6
conda activate tensorflow36
激活環(huán)境
conda list
查看已經(jīng)安裝的包
conda search tensorflow
可安裝的tensorflow版本
pip install tensorflow==2.1.0
出現(xiàn)錯誤
conda install tensorflow==2.1.0
安裝完成
>>> import tensorflow as tf
>>> tf.compat.v1.disable_eager_execution()
>>> sess=tf.compat.v1.Session()
>>> hello=tf.constant('hello')
>>> print(sess.run(hello))
測試成功