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
完成!