Tensorflow报错tf.estimator package not installed

重新安装和使用的TensorFlow的时候,遇到了一些环境上的小问题:
1、tf.estimator package 未安装

tf.estimator package not installed

我使用的环境是:
anaconda 5.2.0, Python 3.6和TensorFlow 1.12
然后在网上找了一下解决方案之后,发现需要更新一下numpy、pandas和matplotlib等package:

pip install -U pandas
pip install -U matplotlib

将pandas的版本更新到了0.23.4,matplotlib更新到3.0.2就好了,然后import TensorFlow的时候就不会报错了
2、import tensorflow的提醒

FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters

这个问题还是环境问题,h5py出了问题,对h5py进行一个升级了就,后面再import tensorflow的时候,就不会出错了。

pip install h5py==2.8.0rc1

3、

TypeError: __init__() got an unexpected keyword argument 'serialized_options'

很有可能是,终端上的 protoc 版本 与python库内的protobuf版本不一样。

pip install -U protobuf

4、将Python程序不挂断的跑到服务器上面,
注意CUDA_VISIBLE_DEVICES=0需要放在nohup的前面。

CUDA_VISIBLE_DEVICES=0 nohup python -u main.py

参考资料:
1、https://github.com/tensorflow/tensorflow/issues/22342
2、https://blog.csdn.net/qq_41185868/article/details/80276847

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

  • 网址 下载与安装 你可以使用我们提供的 Pip, Docker, Virtualenv, Anaconda 或 源...
    九七学姐阅读 4,996评论 3 11
  • 1. 介绍 首先让我们来看看TensorFlow! 但是在我们开始之前,我们先来看看Python API中的Ten...
    JasonJe阅读 12,031评论 1 32
  • 博客:https://blog.csdn.net/qq_34106574/article/details/8069...
    AI小白龙阅读 19,310评论 0 4
  • 咋天问欧尚到家买了两单结果是一次也不成功,原因是App上的货与超市实体店的货品不一致,一次次让我退货,结果货不到款...
    紫微妈咪阅读 875评论 0 0
  • 每次唱「后来」这首歌,我都会想到你。我们从初二到现在毕业,已经认识八年了,我时常在想,我到底哪里好,这么多年都过...
    小夭小妖阅读 255评论 0 0

友情链接更多精彩内容