Installing top2vec package, particularly in H2O Notebooks, and the error.

huangapple go评论64阅读模式
英文:

Installing top2vec package, particularly in H2O Notebooks, and the error

问题

After installing python top2vec package in H2O notebooks (!pip install top2vec), I am getting the following error when importing top2vec:

在H2O笔记本中安装python top2vec包(!pip install top2vec)后,在导入top2vec时出现以下错误:

import top2vec

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

ValueError: numpy.ndarray大小已更改,可能表示二进制不兼容性。从C头部预期96,从PyObject获取88

I tried the techniques used in https://github.com/MaartenGr/BERTopic/issues/392 and also https://stackoverflow.com/questions/75045575/unable-to-install-top2vec, but none of them were helpful. It looks it is incompatible with numpy package. Any help on how to tackle the error in H2O environment much appreciated!

我尝试了https://github.com/MaartenGr/BERTopic/issues/392和https://stackoverflow.com/questions/75045575/unable-to-install-top2vec中使用的技巧,但都没有帮助。看起来它与numpy包不兼容。非常感谢在H2O环境中如何解决错误的任何帮助!

英文:

After installing python top2vec package in H2O notebooks (!pip install top2vec), I am getting the following error when importing top2vec:

import top2vec

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

I tried the techniques used in https://github.com/MaartenGr/BERTopic/issues/392 and also https://stackoverflow.com/questions/75045575/unable-to-install-top2vec, but none of them were helpful. It looks it is incompatible with numpy package. Any help on how to tackle the error in H2O environment much appreciated!

Installing top2vec package, particularly in H2O Notebooks, and the error.

答案1

得分: 1

我猜测gensim可能是针对不同版本的numpy进行编译的。我建议尝试重新编译gensim(类似于pip install --force-reinstall --ignore-installed --no-binary :all: gensim),或将numpy版本更改为在安装top2vec之前的版本。

英文:

My guess would be that gensim is compiled against different version of numpy. I would try to recompile gensim (something like pip install --force-reinstall --ignore-installed --no-binary :all: gensim) or change the numpy version to the one that was there before the top2vec was installed.

huangapple
  • 本文由 发表于 2023年5月11日 10:04:37
  • 转载请务必保留本文链接:https://go.coder-hub.com/76223664.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定