英文:
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!
答案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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论