AttributeError: module 'scipy' has no attribute 'io'

编辑如下代码时,

import scipy.io
scipy.io.loadmat(image[0][i])['section'], dtype=np.float32)

会报错:

AttributeError: module 'scipy' has no attribute 'io'

将代码改为:

import scipy.io as sio
sio.loadmat(image[0][i])['section'], dtype=np.float32)

又会报另一个错误:

TypeError: super(type, obj): obj must be an instance or subtype of type

这是为什么呢?求正确的解决方案。。。(scipy已经降级到1.2.1版本,python是3.7版本)

我也遇到了这个问题,解决方法:将import scipy.io改成from scipy import io