您当前的位置: 首页 > 
  • 0浏览

    0关注

    2393博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

成功解决AttributeError: type object ‘h5py.h5r.Reference‘ has no attribute ‘__reduce_cython__‘

一个处女座的程序猿 发布时间:2018-06-30 21:45:39 ,浏览量:0

成功解决AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__'

目录

解决问题

解决思路

解决方法

T1、更新Cython 库、scipy库

T2、直接更新h5py库

T3、降低h5py库的版本

解决问题
  File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
  File "h5py\h5r.pxd", line 21, in init h5py._conv
  File "", line 971, in _find_and_load
  File "", line 955, in _find_and_load_unlocked
  File "", line 656, in _load_unlocked
  File "", line 626, in _load_backward_compatible
  File "f:\program files\python\python36\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 714, in load_module
    module = loader.load_module(fullname)
  File "h5py\h5r.pyx", line 145, in init h5py.h5r
AttributeError: type object 'h5py.h5r.Reference' has no attribute '__reduce_cython__'
[25780] Failed to execute script CV_Object

20211108

 

 

解决思路

没有该属性,一般都是版本不兼容引起的!

相关文章no attribute __reduce_cython__ #1953Cython的用法以及填坑姿势

解决方法 T1、更新Cython 库、scipy库

很可能是Cython 0.26与python3不兼容,更新Cython 库、scipy库

最后,再配置解决的方法,给定参数即可

--hidden-import=h5py

T2、直接更新h5py库
conda update h5py

 

 

T3、降低h5py库的版本
pip install h5py==2.7.0

 

哈哈!大功告成!  

关注
打赏
1664196048
查看更多评论
立即登录/注册

微信扫码登录

0.0442s