导入arch模块python

2024-10-05 14:22:46 发布

您现在位置:Python中文网/ 问答频道 /正文

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

但是,我还需要使用其他函数,例如ConstantMean,如维护程序githubhere中所述

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

ImportError: cannot import name 'ConstantMean' from 'arch' (C:\Users\frede\anaconda3\envs\earnings_risk\lib\site-packages\arch_init_.py)

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


Tags: 模块函数namefromimportmodel错误users