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.

相关文章

学习编程是顺着互联网的发展潮流,是一件好事。新手如何学习...
IT行业是什么工作做什么?IT行业的工作有:产品策划类、页面...
女生学Java好就业吗?女生适合学Java编程吗?目前有不少女生...
Can’t connect to local MySQL server through socket \'/v...
oracle基本命令 一、登录操作 1.管理员登录 # 管理员登录 ...
一、背景 因为项目中需要通北京网络,所以需要连vpn,但是服...