
?安装时遇到的错误
1、
ERROR: Cannot uninstall 'wrapt'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
解决:pip install -U --ignore-installed wrapt enum34 simplejson netaddr
2、
ERROR: tensorboard 1.14.0 has requirement setuptools>=41.0.0, but you'll have setuptools 39.1.0 which is incompatible.
解决:pip install --upgrade setuptools
? 安装h5py时如遇权限问题 加上 --user
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝访问。: 'd:\\ai\\anaconda\\lib\\site-packages\\~5py\\defs.cp36-win_amd64.pyd' Consider using the `--user` option or check the permissions.
解决:pip install h5py==2.8.0rc1 --user
!测试TensorFlow是否成功安装
import tensorflow as tf
hello=tf.contant(“Hello TensorFlow”)
sess=tf.session()
print(sess.run(hello))
?如何查看tensorflow版本
打开cmd-->输入python-->输入import tensorflow as tf-->输入tf.__version__
?如何查看tensorflow是cpu版本还是gpu版本
打开编辑器,运行以下代码
import os
from tensorflow.python.client import device_lib
os.environ["TF_CPP_MIN_LOG_LEVEL"] = "99"
if __name__ == "__main__":
print(device_lib.list_local_devices())
985

被折叠的 条评论
为什么被折叠?



