python开发之anaconda以及win7下安装gensim的方法

python开发之anaconda以及win7下安装gensim的方法

一、推荐安装Anaconda

官方介绍:Anaconda is a completely free Python distribution (including for commercial use and redistribution). It includes more than 400 of the most popular Python packages for science, math, engineering, and data analysis. 

下载页面:https://www.continuum.io/downloads

Python的有些模块在单独安装时可能非常麻烦,Anaconda中则已经集成好了许多常见的模块,用起来非常方便。

安装Anaconda之前不需要预先安装python,它其中已经自带Python、IPython、集成开发环境Spyder、一些包等等。 

anaconda自带的conda命令:

# 查看安装的包
conda list
# 安装模块
conda install scipy
# 更新模块
conda update scipy
# 更新所有模块
conda update --all
# 升级Anaconda
conda update conda
conda update anaconda

二、gensim安装

因为需要学习使用word2vec,所以要安装gensim模块。

用传统python安装gensim库时,由于依赖的库比较多,试过很多教程之后还是失败。

利用上面安装好Anaconda之后,直接pip install gensim就成功了。

以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。