python自然语言处理环境安装(centOS)

来源:互联网 发布:linux基础试题 编辑:程序博客网 时间:2024/05/29 13:28

nltk安装

首先安装python-pip

首先安装epel扩展源:sudo yum -y install  epel-release

然后就可以安装pip:sudo yum -y install python-pip

清空缓存:sudo yum clean all

安装nltk:pip install -U nltk

nltk data安装

命令行输入

python

>>import nltk

>>nltk.download()

根据提示,选择download,然后选择all下载全部

NumPy安装

sudo pip install -U numpy

Matplotlib安装

yum search matplotlib

输出:

Loading mirror speeds from cached hostfile

 * base: mirror.sunnyvision.com
 * epel: mirror.pregi.net
 * extras: mirrors.nju.edu.cn
 * updates: repo.virtualhosting.hk
 * webtatic: sp.repo.webtatic.com
=========================== N/S matched: matplotlib ============================
python-matplotlib-doc.x86_64 : Documentation files for python-matplotlib
python-matplotlib-qt4.x86_64 : Qt4 backend for python-matplotlib
python-matplotlib-tk.x86_64 : Tk backend for python-matplotlib
python-matplotlib.x86_64 : Python 2D plotting library
rootplot.x86_64 : Plots ROOT data with matplotlib

选择最后一个:yum install python-matplotlib.x86_64

成功安装

原创粉丝点击