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