New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AttributeError: h5py.h5.H5PYConfig' has no attribute '__reduce_cython__' #1477
Comments
So I am also having this issue and apparently one workaround would be to downgrade to 2.7. I also tried 2.8 and 2.9 and the issue remained. But in my case when trying the 2.7 I got the following:
|
@prpeixoto That looks like an installation issue. I suggest uninstalling and reinstalling h5py via which ever mechanism you are using @michaelStettler That looks like you are trying to compile h5py from source but do not have the hdf5 headers available on your system. |
Thanks for your answer. May I ask if you could point me out to get the headers correctly ? |
I suggest looking at the appveyor config files (https://github.com/h5py/h5py/blob/master/appveyor.yml) which show how we build h5py on windows for CI. I am unfortunately not really qualified to answers how to get headers on windows beyond that. |
Thanks! I'll have a look But so far at least I have no more error messages with: I'll continue and edit my message if it all works fine for me. |
I do not doubt that the built binary artifacts from h5py are involved, but I think the root of the issue is a miss-match between the other libraries. This should be reported to who ever is providing your packages and possibly to the tensorflow folks. I do not think there is anything we can do about this on the code side in h5py. |
I see, well thanks anyway From my side, I confirm that my project runs with h5py 2.7. |
Can anyone reproduce this error without Tensorflow? |
Hi! I've got the same problem with Tensorflow 2.3.0.: ERROR: tensorflow 2.3.0 has requirement h5py<2.11.0,>=2.10.0, but you'll have h5py 2.7.0 which is incompatible. But I can't install it. Are there any channels to update it for Conda environment? |
Open python or jupyter, spyder with administrator rights |
Running Python as admin is unlikely to solve a problem like this in general, even if it happened to work in one specific case. It's also bad advice in general: code running as admin has more power to mess up your system. |
Run Then run That fixed it for me. |
Closing this issue as it is an installation issue and not anything we can fix at the source level. |
thanks @princyok for useful helping |
I got the same issue, just you need to uninstall and then install it 'h5py'. |
pip uninstall h5py
pip install h5py worked for me. By the way, you may have to open your PowerShell with administrative privilege. For the update to load in |
If you upgrade something that you have already imported, it's normal that you have to restart Python (restart the kernel, in Jupyter) to pick it up. |
Correct Solution |
Hello all,
I'm trying to load a previously saved tensorflow model that was saved using th5 extension on my program, however, when trying to import the tensorflow library, the error bellow is displayed. I've tried downgrading the h5py, and it didn't work. I also tried the newer version of tensorflow with no result. Does anyone have any idea what could be causing this? Thank you
The error displayed:
AttributeError("type object 'h5py.h5.H5PYConfig' has no attribute 'reduce_cython'")
The text was updated successfully, but these errors were encountered: