【发布时间】:2020-11-06 09:37:04
【问题描述】:
我正在尝试在 conda 环境中将 Tensorflow 模块导入我的 Jupyter 笔记本中,但出现以下错误:
AttributeError: type object 'h5py.h5.H5PYConfig' has no attribute '__reduce_cython__'
但是,如果我打开 Anaconda Prompt,激活相同的环境并在 shell 中导入 tensorflow,它确实可以工作。
版本:
tensorflow-gpu: 2.2h5py: 2.10
我尝试降级到不同的版本(h5py 2.7 和 tf-gpu 2.1),但这会导致更多的软件包版本冲突错误。
有谁知道为什么 Jupyter 不加载模块以及为什么它在 Anaconda shell 中工作?
谢谢
【问题讨论】:
标签: python tensorflow jupyter-notebook