CentOS下安装python版的word2vec报如下错误
[root@localhost /]# pip install --upgrade gensim
Collecting gensim
Using cached gensim-2.0.0.tar.gz
Complete output from command python setup.py egg_info:
The required version of setuptools (>=1.3.2) is not available,
and can't be installed while this script is running. Please
install a more recent version first, using
'easy_install -U setuptools'.
(Currently using setuptools 0.9.8 (/usr/lib/python2.7/site-packages))
----------------------------------------
Command "python setup.py egg_info" failed with error code 2 in /tmp/pip-build-_oN2SQ/gensim/
根据错误的提示可以看出是由于setuptools版本过低的问题,解决此问题可以使用pip升级setuptools
[root@localhost /]# pip install -U pip setuptools
升级成功之后再次执行
[root@localhost /]# pip install --upgrade gensim