Python数据分析 EPD

参考用书 《利用Python进行技术分析:Python for Data Analysis》

官方把epd (https://www.enthought.com/products/canopy/package-index/) 升级为Canopy(https://www.enthought.com/products/canopy/package-index/),为了尽可能和书籍一致,只能去其他地方想办法了

从这里下载离线镜像 http://mirror.seas.harvard.edu/epd/enthought.com/repo/free/

$wget http://mirror.seas.harvard.edu/epd/download.enthought.com/epd_free/epd_free-7.2-2-rh5-x86_64.sh

安装:http://courses.cs.washington.edu/courses/cse140/12su/computing-resources.html

#chmod u+x epd_free-7.2-2-rh5-x86_64.sh

$.epd_free-7.2-2-rh5-x86_64.sh

先让你接受协议,然后指定安装路径,如~/epd会自动安装依赖如下:

Do you approve the license terms? [yes|no]
[no] >>> yes

EPD_free will be installed to this location:
/home/jp/Downloads/epd_free-7.2-2-rh5-x86_64

  * Press Enter to accept this location
  * Press CTRL-C to abort
  * or specify an alternate location.  Please ensure that your location
    contains only ASCII letters, numbers and the following punctuation
    chars: '.', '_', '-'

[/home/jp/Downloads/epd_free-7.2-2-rh5-x86_64] >>> /home/jp/epd
Installing to /home/jp/epd ... please wait
Fixing RPATH...
Trying to run Python interpreter:
/home/jp/epd
Compiling all Python modules...
Extracting: '.zips/special.zip'
Bootstrapping: LOCAL-REPO/enstaller-4.4.1-1.egg
   322 KB [.................................................................]
appinst-2.1.0-1.egg                                              [installing]
   107 KB [.................................................................]
cloud-2.3.9-1.egg                                                [installing]
   837 KB [.................................................................]
configobj-4.7.2-2.egg                                            [installing]
   244 KB [.................................................................]
distribute-0.6.24-1.egg                                          [installing]
  1.45 MB [.................................................................]
etsproxy-0.1.1-1.egg                                             [installing]
  1.03 MB [.................................................................]
Examples-7.2-0.egg                                               [installing]
  3.38 MB [.................................................................]
freetype-2.4.4-1.egg                                             [installing]
  2.78 MB [.................................................................]
idle-2.7.2-2.egg                                                 [installing]
    73 KB [.................................................................]
ipython-0.12-1.egg                                               [installing]
  7.27 MB [.................................................................]
nose-1.1.2-1.egg                                                 [installing]
   916 KB [.................................................................]
numpy-1.6.1-0.egg                                                [installing]
 26.24 MB [.................................................................]
PIL-1.1.7-3.egg                                                  [installing]
  1.44 MB [.................................................................]
pyaudio-0.2.4-1.egg                                              [installing]
   218 KB [.................................................................]
pyface-4.1.0-1.egg                                               [installing]
  3.52 MB [.................................................................]
pyglet-1.1.4-2.egg                                               [installing]
  5.67 MB [.................................................................]
python_dateutil-1.5-2.egg                                        [installing]
   399 KB [.................................................................]
pytz-2011n-1.egg                                                 [installing]
   913 KB [.................................................................]
pyzmq-2.1.11-1.egg                                               [installing]
  1.47 MB [.................................................................]
scipy-0.10.0-0.egg                                               [installing]
107.06 MB [.................................................................]
tornado-2.1.1-1.egg                                              [installing]
  1.34 MB [.................................................................]
traits-4.1.0-1.egg                                               [installing]
  2.24 MB [.................................................................]
traitsui-4.1.0-1.egg                                             [installing]
  4.43 MB [.................................................................]
wxPython-2.8.10.1-3.egg                                          [installing]
 58.68 MB [.................................................................]
apptools-4.0.1-1.egg                                             [installing]
  1.68 MB [.................................................................]
enable-4.1.0-1.egg                                               [installing]
  5.31 MB [.................................................................]
matplotlib-1.1.0-1.egg                                           [installing]
 13.27 MB [.................................................................]
chaco-4.1.0-1.egg                                                [installing]
  2.90 MB [.................................................................]
EPD-7.2-0.egg                                                    [installing]
     5 KB [.................................................................]
PythonDocHTML-2.7.2.egg                                          [installing]
 28.83 MB [.................................................................]
done.

    As the last step, you should edit your .bashrc or prepend
    the EPD_free install path:

        /home/jp/epd/bin

    Thank you for installing EPD_free!

然后安装padas

#sudo easy_install pandas

Error 1:

pkg_resources.VersionConflict: (numpy 1.6.1 (/home/jp/epd/lib/python2.7/site-packages), Requirement.parse('numpy>=1.7.0'))

$sudo pip install --upgrade numpy>=1.7.0

Error 2:

# Extra version check in case wxversion lacks AlreadyImportedError;
ImportError: Matplotlib backend_wx and backend_wxagg require wxPython >=2.8
#sudo pip install --upgrade wxPython>=2.8

http://stackoverflow.com/questions/5121574/wxpython-import-error
$sudo apt-get install libjpeg62 

Error 3:

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 72: ordinal not in range(128)
$sudo apt-get install libevent-dev python-dev

安装pandas

#sudo easy_install pandas
gcc编译 ,时间会比较久

安装完成后,

$ipython --pylab

import pandas

Error 4:ImportError: No module named pandas

检查了下原因,pandas确实是已经装了,只不过没有装在epd/bin下, epd/bin下的Python版本是2.7.2

系统自带的python 是2.7.6 ,结果把pandas装在系统自带的Python site-packages里了。现在就卡在这一步,先记录到这里再说。

posted on 2015-02-15 11:38  ≮绝影ミ↖  阅读(811)  评论(0编辑  收藏  举报