ImportError-arch模块python

ImportError-arch模块python,python,Python,我正在尝试使用python中的arch模块。安装后,我通过从arch import arch_model执行,成功导入了arch_model 但是,我还需要使用其他函数,如maintainers github上记录的ConstantMean 但是,当我尝试导入它时,会出现以下错误: ImportError:无法从“arch”导入名称“ConstantMean” (C:\Users\frede\anaconda3\envs\earnings\u risk\lib\site packages\arc

我正在尝试使用python中的arch模块。安装后,我通过从arch import arch_model执行
,成功导入了
arch_model

但是,我还需要使用其他函数,如maintainers github上记录的
ConstantMean

但是,当我尝试导入它时,会出现以下错误:

ImportError:无法从“arch”导入名称“ConstantMean” (C:\Users\frede\anaconda3\envs\earnings\u risk\lib\site packages\arch\u init\uuu.py)


当我通过
dir(arch)
检查模块中可用的功能时,它也没有列出
ConstantMean
,也没有列出根据文档理论上应该可用的大多数其他功能。这是什么原因呢?感谢您的帮助。

试试这个:

from arch.univariate import ConstantMean