我正在尝试使用 Gensim 构建 ML 脚本,但当我尝试运行代码时,我不断收到此错误。
ImportError: cannot import name 'triu' from 'scipy.linalg'
有什么想法吗?
我发现了问题。
The scipy.linalg functions tri, triu & tril are deprecated and will be removed in SciPy 1.13.
所以,我安装了 scipy v1.10.1 而不是最新版本,并且运行良好。
pip install scipy==1.10.1