安装tensorflow
1、cmd打开命令行,输入如下代码,创建tensorflow环境
C:\Users\shijun.wu>conda create -n tensorflow python=3.6
2、当出现Proceed ([y]/n)? 时,输入y
3、激活tensorflow
输入C:\Users\shijun.wu>activate tensorflow
之后会得到:(tensorflow) C:\Users\shijun.wu>
4、在tensorflow环境中安装tensorflow
(tensorflow) C:\Users\shijun.wu>pip install tensorflow
坐等出现:Successfully installed absl-py-0.2.0 astor-0.6.2 bleach-1.5.0 gast-0.2.0 grpcio-1.11.0 html5lib-0.9999999 markdown-2.6.11 numpy-1.14.2 protobuf-3.5.2.post1 six-1.11.0 tensorboard-1.7.0 tensorflow-1.7.0 termcolor-1.1.0 werkzeug-0.14.1
至此安装完毕
检验是否安装上了tensorflow
1、输入:(tensorflow) C:\Users\shijun.wu>python
2、输入:>>> import tensorflow
没有出现异常,则安装成功。