Using Gensim shows “Slow version of gensim.models.doc2vec being used”

荒凉一梦 提交于 2020-01-23 08:27:10

问题


I am trying to run a program using the Gensim library of the Python with the version 3.6.
Whenever I ran the program, I came across these statements:

C:\Python36\lib\site-packages\gensim-2.0.0-py3.6-win32.egg\gensim\utils.py:860: UserWarning: detected Windows; aliasing chunkize to chunkize_serial
  warnings.warn("detected Windows; aliasing chunkize to chunkize_serial")
Slow version of gensim.models.doc2vec is being used

I do not understand what is the meaning behind Slow version of gensim.models.doc2vec is being used. How the gensim is selecting the slow version and if I want the fastest version then what I need to do?


回答1:


Highlighting @juanpa.arrivillaga's comment, as it helped me resolve this issue.
If you installed anaconda :

  • uninstall gensim : pip uninstall gensim
  • install it with the anaconda package manager : conda install gensim



回答2:


The problem is to do with the some underlying packages not being up to date. Gordon's post here helped me.

But in short:

  1. Uninstall Gensim

    sudo pip3 uninstall gensim

  2. Install python3-dev build-essential

    sudo apt-get install python3-dev build-essential

  3. 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




回答3:


I also had this problem (I'm running ubuntu). I found out that if i'm using directly the version from github, the problem is fixed.

So there are 2 solutions: (first uninstall gensim using pip uninstall gensim)

  1. download and unzip the gensim zip file from gensim's github page, then CD to the folder of the zip content and run the command python setup.py install
  2. run this command pip install git+https://github.com/RaRe-Technologies/gensim@master#egg=gensim

I used the second and now I don't get the warnings



来源:https://stackoverflow.com/questions/44490739/using-gensim-shows-slow-version-of-gensim-models-doc2vec-being-used

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