微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

DTM使用途中的bug记录

bug1:

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

这是numpy库和scipy库版本不兼容导致的。因为这段bug上面多次提到gensim库,而gensim库又是和numpy库和scipy息息相关的。检查了gensim库和pip库,没发现问题,都是最新版本的,所以我试着在numpy库和scipy库上找问题。

解决办法:

用cmd打开Python输入以下代码,让numpy库和scipy库兼容就好。

pip uninstall numpy
pip uninstall scipy
pip uninstall gensim
pip install numpy
pip install scipy
pip install gensim

参考文章使用gensim时出现的问题与解决_imapotato的博客-CSDN博客_gensim和numpy不兼容报错如下:---------------------------------------------------------------------------ModuleNotFoundError Traceback (most recent call last)<ipython-input-1-3821d4821701> in ...https://blog.csdn.net/K52hz/article/details/104422149 


 bug2:

这是在用Python安装gensim的4.0.0版本时弹出的错误。大致说的是软件包有问题,而不是pip。上Python官网一看,原来gensim的4.0.0版本的build已经显示Failed的了。4.0.0版本是下载不了了,我也暂时没有解决办法,就下载个最新的版本吧,感觉也差不多。

error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\link.exe' Failed with exit code 1120
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> gensim

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

原文地址:https://www.jb51.cc/wenti/3281567.html

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐