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

前端 未结 4 429
庸人自扰
庸人自扰 2021-01-18 15:26

I\'m using the library node2vec, which is based on gensim word2vec model to encode nodes in an embedding space, but when i want to fit the word2vec object I get this warning

4条回答
  •  醉话见心
    2021-01-18 16:03

    I've faced this issue for a long time when I was running W2V Models which requires 'gensim'. First of all I've installed Anaconda Navigator and then installed required packages using pip. I've installed gensim manually using pip in cmd. When I run the W2V model, it took 40 min to train and give the result, which made me annoying and wasted a lot of time.

    This problem got solved now. I just did what the warning showed. I've uninstalled gensim from my computer. Prior to that I've already created a system path of mingw-w64 in the environment variable which is an environment for c,c++ etc., programs. Later, I've reinstalled gensim using 'pip install gensim'.

    Now the program is running within seconds which made a drastic change in the execution time.

    Hope this helps...

提交回复
热议问题