tensorboard命令报错:tensorboard.util has no attribute Retriev

只在程序中定义了一个命名空间:
#定义两个placeholder
with tf.name_scope(‘input’): #input
x = tf.placeholder(tf.float32,[None,784],name=‘x-input’)
y = tf.placeholder(tf.float32,[None,10],name=‘y-input’)

with tf.Session() as sess:
sess.run(init)
writer=tf.summary.FileWriter(‘logs/’,sess.graph)
for epoch in range(10):
for batch in range(n_batch):
batch_xs,batch_ys = mnist.train.next_batch(batch_size)
sess.run(train_step,feed_dict={x:batch_xs,y:batch_ys})

  然后在cmd中运行命令:
  tensorboard --logdir=logs
  报错:tensorboard.util has no attribute ‘Retriev’

搜了一圈,定位为版本问题。
当前版本是1.13
而我的tensorflow版本是1.5
所以pip uninstall tensorboard
然后重新安装:pip uninstall tensorboard==1.5.0
结果说没有找到版本,但是推荐1.6.0 … 1.13.0
我选了最古老的版本:
pip uninstall tensorboard= =1.6.0i

重新运行命令,结果继续报错:
cannot remove entries from nonexistent file anaconda3 lib site-packages easy-install.pth

继续奔溃,应该是setuptool的版本问题,试了一下网上解决办法:
pip install --upgrade --ignore-installed setuptools

终于成功了。在chrome中输入地址:
http://**-pc:6006/
成功~

猜你喜欢

转载自blog.csdn.net/qq_17854471/article/details/89300069