从“statsmodels.tsa.Region\u switching.\u hamilton\u filter”导入“shamilton\u filter\u log”时出错

2024-10-01 15:32:37 发布

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

我试图在python中从statsmodels(link description here)编译MarkovSwitching.py,但我有以下错误

ImportError: cannot import name 'shamilton_filter_log' from 'statsmodels.tsa.regime_switching._hamilton_filter'  (C:\Users\myuser\Anaconda3\lib\site-packages\statsmodels\tsa\regime_switching\_hamilton_filter.cp37-win_amd64.pyd)

我不知道如何解决这个问题。此外,我使用“”pip install statsmodels--upgrade“”升级statsmodels,但不起作用

我不知道如何解决这个问题,欢迎任何帮助

谢谢


Tags: pyimporthere错误linkdescriptionfilterstatsmodels
1条回答
网友
1楼 · 发布于 2024-10-01 15:32:37

很难从您的描述中判断出可能出了什么问题,因为您的设置可能存在许多问题

看起来您可能已经通过Conda或pip安装了Statsmodels v0.10,然后下载了markov_switching.py的开发版本。开发版本有v0.10所没有的新功能,这是我对为什么会出现错误的猜测

您可以尝试使用:pip install statsmodels==0.11.0rc1安装v0.11的候选版本

相关问题 更多 >

    热门问题