C extension not loaded for Word2Vec

我是研究僧i 提交于 2020-01-03 09:04:24

问题


I re-install the gensim pkg and Cython but it continusly show this warning, Does anybody know about this? I am using Python 3.6,PyCharm Linux Mint.

UserWarning: C extension not loaded for Word2Vec, training will be slow. Install a C compiler and reinstall gensim for fast training. warnings.warn("C extension not loaded for Word2Vec, training will be slow. "

And it also show this line when I create or load model.
Slow version of gensim.models.doc2vec is being used


回答1:


There is some problem with the some underlying packages not being up to date. Here I found the answer which work for me, which is in short:

Uninstall Gensim

sudo pip3 uninstall gensim

Install python3-dev build-essential

sudo apt-get install python3-dev build-essential  

Re-Install Gensim

sudo pip3 install --upgrade gensim

Notes:

Instructions above are for systems where pip and apt-get are used to manage packages
pip3 is the python3 version of pip



来源:https://stackoverflow.com/questions/45499558/c-extension-not-loaded-for-word2vec

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!