← 返回首页
Error using h5r>init h5py.h5r (line 145) AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__' · Issue #1151 · h5py/h5py · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

Error using h5r>init h5py.h5r (line 145) AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__' #1151

New issue
New issue

Description

  • Operating System Windows 7 enterprise
  • Python version 3.6.7 Anaconda installation
  • Matlab 9.1.0.441655 (R2016b)
    pyversion 'C:\ProgramData\Anaconda3\envs\tensorflow\python.exe'
    ... = py.importlib.import_module('file_name');
  • h5py version 2.9.0
  • HDF5 version 1.10.4

Hello,

I want to use tensorflow via matlab as above.
I can import tensorflow and h5py both without any problems in the console.
When I want to use it together with matlab I get the error:

Error: Python Error: AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__' init h5py.h5r at 145 init h5py._conv at 21 <module> at 36 <module> at 38 <module> at 39 <module> at 43 <module> at 22 <module> at 35 <module> at 24 <module> at 24 <module> at 88 <module> at 24 <module> at 2 _call_with_frames_removed at 219 exec_module at 678 _load_unlocked at 665 _find_and_load_unlocked at 955 _find_and_load at 971 _gcd_import at 994 import_module at 126 Error using h5r>init h5py.h5r (line 145) Python Error: AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__' Error in h5r>init h5py._conv (line 21) Error in __init__><module> (line 36) from ._conv import register_converters as _register_converters Error in saving><module> (line 38) import h5py Error in network><module> (line 39) from tensorflow.python.keras.engine import saving Error in training><module> (line 43) from tensorflow.python.keras.engine.network import Network Error in multi_gpu_utils><module> (line 22) from tensorflow.python.keras.engine.training import Model Error in __init__><module> (line 35) from tensorflow.python.keras.utils.multi_gpu_utils import multi_gpu_model Error in activations><module> (line 24) from tensorflow.python.keras.utils.generic_utils import deserialize_keras_object Error in __init__><module> (line 24) from tensorflow.python.keras import activations Error in __init__><module> (line 88) from tensorflow.python import keras Error in __init__><module> (line 24) from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import Error in demo_regression_UCI><module> (line 2) import tensorflow as tf Error in <frozen importlib>_call_with_frames_removed (line 219) Error in <frozen importlib>exec_module (line 678) Error in <frozen importlib>_load_unlocked (line 665) Error in <frozen importlib>_find_and_load_unlocked (line 955) Error in <frozen importlib>_find_and_load (line 971) Error in <frozen importlib>_gcd_import (line 994) Error in __init__>import_module (line 126) return _bootstrap._gcd_import(name[level:], package, level) Error in Deep_GP_Doubly_Model/modelfit (line 181) obj.loadPythonModule();

Can you help me with this?
Do you know what is the problem?

Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Footer

      © 2026 GitHub, Inc.