參考用書 《利用Python進行技術分析:Python for Data Analysis》html
官方把epd (https://www.enthought.com/products/canopy/package-index/) 升級爲Canopy(https://www.enthought.com/products/canopy/package-index/),爲了儘量和書籍一致,只能去其餘地方想辦法了python
從這裏下載離線鏡像 http://mirror.seas.harvard.edu/epd/enthought.com/repo/free/ bash
$wget http://mirror.seas.harvard.edu/epd/download.enthought.com/epd_free/epd_free-7.2-2-rh5-x86_64.shapp
安裝:http://courses.cs.washington.edu/courses/cse140/12su/computing-resources.htmlpython2.7
#chmod u+x epd_free-7.2-2-rh5-x86_64.shtornado
$.epd_free-7.2-2-rh5-x86_64.shui
先讓你接受協議,而後指定安裝路徑,如~/epd會自動安裝依賴以下:this
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!code
而後安裝padashtm
#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裏了。如今就卡在這一步,先記錄到這裏再說。