1.创建一个新的conda环境
conda create -n tensorflow python=3.6.9
2.激活环境
conda activate tensorflow
3.安装tensorflow
conda install tensorflow-gpu==1.12 //此处tensorflow版本为使用GPU的1.12版
4.查看是否安装成功
python
import tensorflow as tf
如果报错"1. FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'."

原因是numpy版本与tensorflow版本不对应
一下是对应表

解决:先卸载现有的numpy版本,并重新指定安装1.16.4(我的anaconda最新版本)版本的numpy
pip uninstall numpy
pip install numpy==1.15.4
然后再次查看

安装成功!