ImportError语言 - arch module python



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

然而,我还需要使用其他函数,如ConstantMean,如维护人员github中所述。

然而,当我尝试导入它时,它会给我以下错误:

ImportError:无法从"arch"导入名称"ConstantMean"(C:\Users\frede\anaconda3\envs\earnings_risk\lib\site packages\arch_init_.py(

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

试试这个:

from arch.univariate import ConstantMean

最新更新