3

I am running gensim on Linux Suse. I can start my python program but on startup I get:

C extension not loaded, training will be slow. Install a C compiler and reinstall gensim for fast training.

GCC is installed. Does anyone know what I have to do?

Maxim
  • 52,561
  • 27
  • 155
  • 209
Janothan
  • 446
  • 4
  • 16

1 Answers1

4

Try the following:

Python 3.x

$ pip3 uninstall gensim    
$ apt-get install python3-dev build-essential      
$ pip3 install --upgrade gensim

Python 2.x

$ pip uninstall gensim    
$ apt-get install python-dev build-essential      
$ pip install --upgrade gensim
Maxim
  • 52,561
  • 27
  • 155
  • 209
  • 1
    Thank you very much for your help. The problem is that on Suse, I do not have apt-get (like on Ubuntu). Do you know what I have to do on Suse specifically? I assume I need to use zypper (which works for python3-dev but not for build-essential). – Janothan May 12 '18 at 14:57
  • 1
    @Janothan Oh, sorry, I missed that. Try `zypper install -t pattern devel_basis` – Maxim May 12 '18 at 16:07
  • 2
    Thanks! The problem is on that in Windows. Well, `apt-get is not recognized as an internal or external command`? Please suggest how to do this on windows specifically with python 3.7? – M S Oct 12 '18 at 07:20
  • Duplicate of [https://stackoverflow.com/questions/45499558/c-extension-not-loaded-for-word2vec](https://stackoverflow.com/questions/45499558/c-extension-not-loaded-for-word2vec) – Agent47 Feb 04 '19 at 09:33
  • 1
    Like @MishraS, I wanted to find a solution on Windows. This resolved it: https://stackoverflow.com/a/55986444/5433896. – Sander Vanden Hautte Jun 28 '19 at 13:14