Fix Gensim ValueError: numpy.ufunc size changed, may indicate binary incompatibility – Gensim Tutorial

By | December 23, 2019

We have installed gensim with conda. However, we find ValueError: numpy.ufunc size changed, may indicate binary incompatibility when we run gensim. How to fix this error? We will introduce you the way to fix it in this tutorial.

Check the gensim version

We check the gensim version we have installed by conda first. We find gensim by everything in our computer and we  find we have installed gensim 3.8.1.

conda install gensim on python 3.6

Why this value error occur?

The main reason is that numpy version is imcompatible with gensim. As to us, the version of numpy is 1.14.1, which is old to gensim 3.8.1.

To check numpy version you can read:

Python Get NumPy Version: A Beginner Guide – NumPy Tutorial

How to fix this value error?

We will update gensim to an older version by anaconda.

We use conda command to search all gensim versions.

conda search gensim

Then we will find a result like this.

conda search gensim version

We have install gensim 3.8.1. To fix this value error, we will update gensim 3.8.1 to 3.5.0.

Update gensim to 3.5.0

We can use conda below to update gensim to 3.5.0.

conda install -c conda-forge --force-reinstall gensim=3.5.0

Then you will find a result like this:

Press y and you will install python gensim 3.5.0.

Then you will find this value error is fixed.

One thought on “Fix Gensim ValueError: numpy.ufunc size changed, may indicate binary incompatibility – Gensim Tutorial

Leave a Reply