首页 > 代码库 > < 独立项目 - 文本挖掘 > - 2016/11/13 第二更 - <Python环境准备>

< 独立项目 - 文本挖掘 > - 2016/11/13 第二更 - <Python环境准备>

< 独立项目 -  文本挖掘 >

项目立项的相关背景介绍,TODO方向。

一、Ubuntu环境配置

  主机系统:Windows 7 SP1   64位操作系统 | i5-4210 CPU | 16GB RAM  

  VirtualBox虚拟环境:GUN VitrualBox

  Linux系统:Ubuntu 15.10(ubuntu-15.10-desktop-i386) 

 

二、Python模块的安装

  1、python当前版本检查

  sylar@SylarMining:~$ python --version

  Python 2.7.10

  2、查看当前安装模块

  sylar@SylarMining:~$ python

  >>>help()

  help>modules

  Please wait a moment while I gather a list of all available modules......

  help>quit

  You are now leaving help and returning to the Python interpreter . If you want to ask for help on a particular object directly from the interpreter,you can type "help(object)" . 

  >>>import sys

  >>>sys.modules

  3、查看模块的版本信息

  >>>import module

  >>>module.__version__

  >>>quit()

  4、常用Python模块的安装

  先进行pip工具的安装:sudo apt-get install python-pip

  安装:pip install PackageName  更新:pip install -U PackageName  移除:pip uninstall PackageName  搜索:pip search PackageName  帮助:pip help

  #查看已经安装的模块:List installed packages

  sylar@SylarMining:~$ pip list

  sylar@SylarMining:~$ wget https://pypi.python.org/pypi/setuptools

  sylar@SylarMining:~$ pip --version

  pip 1.5.6 from /usr/lib/python2.7/dist-packages(python2.7)

  #安装setuptools:

  sylar@SylarMining:~$ sudo apt-get install python-setuptools

  #查看Ubuntu中安装的Python路径

  sylar@SylarMining:~$ whereis python

  python:/usr/bin/python2.7

  sylar@SylarMining:~$ which python

  /usr/bin/python

 

  #安装numpy模块和matplotlib模块

  sylar@SylarMining:~$ sudo apt-get install python-numpy

  sylar@SylarMining:~$ sudo apt-get install python-scipy

  sylar@SylarMining:~$ sudo apt-get install python-matplotlib

  

  #安装Python开发环境

  sylar@SylarMining:~$ sudo apt-get install python-dev

  #安装IPython

  sylar@SylarMining:~$ sudo apt-get install ipython

  #安装tornado

  sylar@SylarMining:~$ sudo apt-get install tornado

  #安装libzmq-dev

  sylar@SylarMining:~$ sudo apt-get install libzmq-dev

  #安装scikit-learn模块(sklearn)

  sylar@SylarMining:~$ sudo apt-get install python-sklearn

  #安装pandas

  sylar@SylarMining:~$ sudo apt-get install python-pandas

  #安装patsy

  sylar@SylarMining:~$ sudo apt-get install python-patsy

  #安装statsmodels

  sylar@SylarMining:~$ sudo apt-get install python-statsmodels

  #安装g++

  sylar@SylarMining:~$ sudo apt-get install g++

  #安装jieba

  sylar@SylarMining:~$ pip install jieba

  #安装NLTK

  sylar@SylarMining:~$ sudo apt-get install python-nltk

  #安装MLpy

  sylar@SylarMining:~$ sudo apt-get install python-mlpy

  #安装Shogun

  sylar@SylarMining:~$ sudo apt-get install python-shogun

  #安装MDP

  sylar@SylarMining:~$ sudo apt-get install python-mdp

  #安装PyBrain

  sylar@SylarMining:~$ pip install pybrain

  #安装BigML

  sylar@SylarMining:~$ pip install bigml

 

 

 

 

  

  

  

 

  

  

  

  

< 独立项目 - 文本挖掘 > - 2016/11/13 第二更 - <Python环境准备>