本文介绍了从pmdarima导入auto_arima时:错误:无法从'scipy.misc'导入名称'factorial'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有python 3.7.1和scipy版本:1.3.0.调用auto_arima时出现错误:无法从'scipy.misc'导入名称'factorial'"

I have python 3.7.1 and scipy version : 1.3.0. I'm getting error while calling auto_arima saying : "cannot import name 'factorial' from 'scipy.misc'"

此基本导入会导致问题:-
从pmdarima.arima导入auto_arima"
我尝试重新安装scipy,但没有成功

Just this basic import causes the issue:-
"from pmdarima.arima import auto_arima"
I've tried reinstalling scipy, didn't work

推荐答案

功能factorialscipy.misc移到了scipy.special. scipy.misc中的版本已被弃用一段时间,并在scipy 1.3.0中删除. pmdarima中的某物或其依赖项之一仍使用名称scipy.misc.factorial.

The function factorial was moved from scipy.misc to scipy.special. The version in scipy.misc has been deprecated for a while, and it was removed in scipy 1.3.0. Something in pmdarima or one of its dependencies is still using the name scipy.misc.factorial.

罪魁祸首似乎是统计模型0.9.0. pmdarima取决于statsmodels,并且statsmodels 0.9.0中有导入scipy.misc.factorial的代码. 如果将statsmodels升级到0.10或更高版本,则应解决此问题.

The culprit appears to be statsmodels 0.9.0. pmdarima depends on statsmodels, and there is code in statsmodels 0.9.0 that imports scipy.misc.factorial. The problem should be fixed if you upgrade statsmodels to version 0.10 or later.

statsmodels开发人员已意识到该问题;见

The statsmodels developers are aware of the issue; see

  • https://github.com/statsmodels/statsmodels/issues/5620
  • https://github.com/statsmodels/statsmodels/issues/5747

这篇关于从pmdarima导入auto_arima时:错误:无法从'scipy.misc'导入名称'factorial'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 21:12