问题
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:
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
回答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)
- 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 - 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