ImportError: cannot import name ‘ss‘完美解决

  • 报错原因

使用statsmodels时,由于statsmodels和scipy版本不兼容的问题,常常报错ImportError: cannot import name 'ss'。

  • 简单粗暴解决方法

pip uninstall statsmodels
pip install statsmodels -i https://pypi.tuna.tsinghua.edu.cn/simple
pip uninstall scipy
pip install scipy -i https://pypi.tuna.tsinghua.edu.cn/simple

可能会遇到,ImportError: cannot import name 'lstsq',重新启动python即可。

Reference

https://docs.scipy.org/doc/scipy-0.19.1/reference/generated/scipy.stats.ss.html

https://stackoverflow.com/questions/54808727/python-cannot-import-name-ss#

图片

往期精彩戳:NGS精进 |统计精进py基础 | py绘图 | perl基础 | R绘图

猜你喜欢

转载自blog.csdn.net/qq_21478261/article/details/113576407