CSDN 叶庭云:https://yetingyun.blog.csdn.net/
TensorLY 官方文档:http://tensorly.org/stable/index.html
pip 安装 tensorly
pip install -U tensorly
在复现基于特征重构的张量 ARIMA,调用 tensorly 时遇到报错如下:
分析认为:报错原因在于版本问题,有看到网上解决方案如下:
但我去 site-packages 里找相应 .py 文件,发现导入包的方式跟它的截图有些不一致。如下所示:
因为已经快 3 年前的项目,我选择将 tensorly 版本降低为 tensorly==0.5.1
ERROR: Could not find a version that satisfies the requirement tensorly==0.5.2 (from versions: 0.1.2, 0.1.3, 0.1.4, 0.1.5, 0.1.6, 0.2.0, 0.3.0, 0.4.0, 0.4.2, 0.4.3, 0.4.4, 0.4.5, 0.5.0, 0.5.1, 0.6.0)
ERROR: No matching distribution found for tensorly==0.5.2
pip uninstall tensorly
pip install tensorly==0.5.1
这样就可以解决报错啦,代码能够成功运行得到结果: