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

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

解决问题


 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 "<frozen importlib._bootstrap>", line 971, in _find_and_load

 File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked

 File "<frozen importlib._bootstrap>", line 656, in _load_unlocked

 File "<frozen importlib._bootstrap>", 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



解决思路


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





解决方法


T1、更新Cython 库、scipy库


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


image.png

image.png

image.png





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



--hidden-import=h5py



T2、降低h5py库的版本


image.png




哈哈!大功告成!


相关文章
|
2月前
|
计算机视觉 Python
解决 NoneType‘ object has no attribute ‘astype’ 问题
解决 NoneType‘ object has no attribute ‘astype’ 问题
30 0
|
4月前
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
386 0
|
4月前
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
108 0
|
5月前
|
数据采集
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
294 0
|
5月前
'WebDriver' object has no attribute 'find_element_by_tag_name'
'WebDriver' object has no attribute 'find_element_by_tag_name'
125 0
|
7月前
|
Java
【面试题精讲】Object类的常见方法有哪些?
【面试题精讲】Object类的常见方法有哪些?
|
8月前
|
Java API 开发工具
Java之API详解之Object类的详细解析(下)
Java之API详解之Object类的详细解析(下)
40 0
|
4天前
|
C#
c# 所有类的最终基类:Object
c# 所有类的最终基类:Object
5 0
|
19天前
|
XML JSON Java
作为所有类的顶层父类,没想到Object的魔力如此之大!
在上一篇博文中我们提到了Java面向对象的四大特性,其中谈及“抽象”特性时做了一个引子,引出今天的主人公Object,作为所有类的顶级父类,Object被视为是James.Gosling的哲学思考,它高度概括了事务的自然与社会行为。
53 13
|
19天前
|
存储 Java 开发者
Java Object类
Java Object类
14 0