Sayonita Ghosh Roy
Sayonita Ghosh Roy

Reputation: 551

How to remove the error "SystemError: initialization of _internal failed without raising an exception"

I am trying to import Top2Vec package for nlp topic modelling. But even after upgrading pip, numpy this error is coming.

I tried

pip install --upgrade pip
pip install --upgrade numpy

I was expecting to run

from top2vec import Top2Vec

model = Top2Vec(FAQs, speed='learn', workers=8)

but it is giving the mentioned error

Upvotes: 55

Views: 92865

Answers (5)

stefanbschneider
stefanbschneider

Reputation: 6086

For me, numba caused the error, which was shown inside the error message. Updating numba solved the problem:

pip install -U numba

Upvotes: 24

philipmathieu
philipmathieu

Reputation: 13

I had a similar error that required updating numba. The root issue was that my Python environment was pinned to Python 3.9. Updating the whole environment to Python 3.10 resolved the issue.

Upvotes: 0

MikeB2019x
MikeB2019x

Reputation: 1205

In my case, as for @CGFoX, I needed to uninstall and reinstall numba. The catch was that numba had been introduced by installing umap but then changed when I later imported scikit-image. After the latter import I had to reinstall numba-0.56.4 to avoid the error.

Upvotes: 1

Amir Charkhi
Amir Charkhi

Reputation: 846

For me it was not the numpy release as I was already on the version 1.23.5. I simply restarted the kernel and re-imported top2vec and it worked.

P.S. I was on an AWS Linux machine

Upvotes: 16

Maarten-vd-Sande
Maarten-vd-Sande

Reputation: 3711

It's probably related to the latest numpy release (v1.24.0). Try installing version 1.23.5:

pip install numpy==1.23.5

Upvotes: 70

Related Questions