900字范文,内容丰富有趣,生活中的好帮手!
900字范文 > jupyter notebook 中运行from scipy import stats之后报错FutureWarning:

jupyter notebook 中运行from scipy import stats之后报错FutureWarning:

时间:2020-12-14 10:03:33

相关推荐

jupyter notebook 中运行from scipy import stats之后报错FutureWarning:

jupyter notebook 中运行from scipy import stats之后报错

FutureWarning:FutureWarning: Using a non-tuple sequence for multidimensional indexing is deprecated; use `arr[tuple(seq)]` instead of `arr[seq]`. In the future this will be interpreted as an array index, `arr[np.array(seq)]`, which will result either in an error or a different result.

那是因为使用的scipy模块版本太低,比如版本是1.1可能会出现警告,将版本更新至1.2后,警告消失

起因:运行如下代码

报错:

原因:

方案一:直接升级

更新速度很慢,而且还不一定成功!

在尝试更换国内镜像网站更新也失败。如下图,下载速度很快。

但是最后报错ERROR: Cannot unpack file 依旧不成功!

使用第二方案:

不过卸载scipy可能也会出现如下问题:

在下载一次即可:pip install -i https://pypi.tuna./simple scipy

完成!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。