[英]While importing auto_arima from pmdarima: ERROR : cannot import name 'factorial' from 'scipy.misc'
I have python 3.7.1 and scipy version : 1.3.0.我有 python 3.7.1 和 scipy 版本:1.3.0。 I'm getting error while calling auto_arima saying : "cannot import name 'factorial' from 'scipy.misc'"我在调用 auto_arima 时遇到错误说:“无法从 'scipy.misc' 导入名称 'factorial'”
Just this basic import causes the issue:-只是这个基本的导入会导致问题:-
"from pmdarima.arima import auto_arima" “从 pmdarima.arima 导入 auto_arima”
I've tried reinstalling scipy, didn't work我试过重新安装 scipy,没有用
The function factorial
was moved from scipy.misc
to scipy.special
.函数factorial
已从scipy.misc
移至scipy.special
。 The version in scipy.misc
has been deprecated for a while, and it was removed in scipy 1.3.0. scipy.misc
的版本已经弃用了一段时间,它在 scipy 1.3.0 中被删除。 Something in pmdarima or one of its dependencies is still using the name scipy.misc.factorial
. pmdarima 或其依赖项之一中的某些内容仍在使用名称scipy.misc.factorial
。
The culprit appears to be statsmodels 0.9.0.罪魁祸首似乎是 statsmodels 0.9.0。 pmdarima depends on statsmodels, and there is code in statsmodels 0.9.0 that imports scipy.misc.factorial
. pmdarima 依赖于 statsmodels,并且在 statsmodels 0.9.0 中有导入scipy.misc.factorial
代码。
The development version of statsmodels has a fix for that, but 0.9.0 is the latest release.
statsmodels 的开发版本对此进行了修复,但 0.9.0 是最新版本。
The problem should be fixed if you upgrade statsmodels
to version 0.10 or later.如果您将statsmodels
升级到 0.10 或更高版本,则问题应该得到解决。
The statsmodels developers are aware of the issue; statsmodels 开发人员已经意识到这个问题; see看
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.