需安裝 libwmf 函式庫,並建立相應的連結。
sudo apt-get install libwmf
sudo ln -s /usr/lib/x86_64-linux-gnu/libwmf.so /usr/lib
需安裝 libwmf 函式庫,並建立相應的連結。
sudo apt-get install libwmf
sudo ln -s /usr/lib/x86_64-linux-gnu/libwmf.so /usr/lib
建立日期 2011-11-17 14:00 最近更新在 2011-11-24 15:01作者是 Mosky
Virtualenv 和 Pythonbrew 都是可以創造虛擬(獨立)Python 環境的工具,只是虛擬(獨立)標的不同。
Virtualenv 可以隔離函數庫需求不同的專案,讓它們不會互相影響。在建立並啟動虛擬環境後,透過 pip
安裝的套件會被放在虛擬環境中,專案就可以擁有一個獨立的環境。
簡而言之,Virtualenv 可以幫你做到:
Pythonbrew 則可以在家目錄中安裝多個 Python,並迅速地切換版本;也可以在指定的 Python 版本下批次測試你的 Python 程式;另外更整合了 Virtualenv。
這篇文章會詳細介紹這兩個工具,讓你在多人開發及多版本開發的環境中更得心應手。
Python 的 package 通常會上傳至 PyPI,有很多工具都可以從 PyPI 安裝 package。下面會使用easy_install
這個工具(由 setuptools 提供)來安裝 Virtualenv 和 Pythonbrew。
如果不知道 easy_install
或還沒安裝 setuptools,在 Debian/Ubuntu 可以用下列指令安裝:
$ sudo apt-get install python-setuptools
在 Fedora/CentOS/Redhat/openSUSE,則可以使用:
$ su -
# yum install python-setuptools
在 Windows 則可以從 setuptools 的頁面找到 *.exe
格式的安裝檔案。安裝完後,可以在C:\PythonX.Y\Scripts\
(X.Y 是 Python 的版本)下找到 easy_install.exe
。記得把這個路徑放進 Windows 環境變數中的 PATH。
接著就可以輕鬆安裝任何在 PyPI 的 Python Package 囉。
Pythonbrew 已整合了 Virtualenv,如果不想額外安裝一個套件,也可以不要裝 Virtualenv。
如果需要安裝,請於命令列模式下輸入下列指令:
# easy_install virtualenv
請於命令列模式下輸入下列指令:
$ virtualenv [指定虛擬環境的名稱]
例如下列指令會建立名為 “ENV" 的虛擬環境:
$ virtualenv ENV
預設在建立虛擬環境時,會依賴系統環境中的 site packages,如果想完全不依賴系統的 packages,可以加上參數 --no-site-packages
來建立虛擬環境:
$ virtualenv --no-site-packages [指定虛擬環境的名稱]
請先切換當前目錄至建立的虛擬環境中。前例中,建立名稱為 “ENV",則:
$ cd ENV
接著,啟動虛擬環境:
$ source bin/activate
在 Windows 環境中則改用:
> \path\to\env\Scripts\activate.bat
然後就可以注意到,在 shell 提示字元的最前面多了虛擬環境的名稱提示:
(ENV) ...$
請於命令列模式下輸入下列指令:
$ deactivate
就可以回到系統原先的 Python 環境。
Virtualenv 在安裝時會附帶 pip
這個 Python 的套件安裝工具,當虛擬環境被啟動時,由它安裝的 package 會出現在虛擬環境的資料夾中,用法是:
(ENV)...$ pip install [套件名稱]
如果系統也有安裝 pip
,請特別注意是否已經啟動虛擬環境,否則套件會被安裝到系統中,而非虛擬環境裡。
如果想要避免 pip
在沒有進入虛擬環境時被使用,可以在 ~/.bashrc
加上:
export PIP_REQUIRE_VIRTUALENV=true
要求 pip
一定要在虛擬環境中執行。
也可以用下面的設定,讓系統的 pip
自動使用啟動中的虛擬環境。
export PIP_RESPECT_VIRTUALENV=true
避免意外將套件安裝至系統環境。
無法從 Shell 啟動虛擬環境的情況,像是使用 mod_python 或 mod_wsgi,這時可以在 Python 的程式中加上:
activate_this = '/path/to/env/bin/activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
來使用安裝在虛擬環境中的 packages。
Virtualenvwrapper 是一個 Virtualenv 的 extension,可使虛擬環境的管理變得更容易。
詳細來說,Virtualenvwrapper 提供下述功能:
請於命令列模式下輸入下列指令:
# easy_install virtualenvwrapper
於 $WORKON_HOME
製作虛擬環境:
$ mkvirtualenv [-i package] [-r requirements_file] [virtualenv options] ENVNAME
列出所有的虛擬環境:
$ lsvirtualenv [-b] [-l] [-h]
-b
是簡短模式;-l
是詳細模式(預設);-h
是印出 help 資訊。
移除虛擬環境:
$ rmvirtualenv ENVNAME
複製虛擬環境:
$ cpvirtualenv ENVNAME TARGETENVNAME
啟動虛擬環境:
$ workon [environment_name]
如果只輸入 workon
,則會列出所有的虛擬環境。
離開虛擬環境一樣是使用 deactivate
。
可以使用下面的設定來告訴 pip
Virtualenv 的路徑。
export PIP_VIRTUALENV_BASE=$WORKON_HOME
Virtualenvwrapper 的功能當然不只如此,更多功能可以參考 Virtualenvwrapper 的官方文件。
Pythonbrew 是個比較新的專案,雖然比較新,卻非常完整。它也有整合上面介紹的 Virtualenv。可以用類似 Virtualenvwrapper 的方式來操作 Virtualenv。
安裝方式與 Virtualenv 一樣,只要輸入下面的指令就可以了:
# easy_install $ pythonbrew
Pythonbrew 官方有推薦的安裝方式,但這篇教學為求一致性,就不額外介紹了,可以參考pythonbrew/README.rst。
對於 Windows 的使用者,很可惜地,Pythonbrew 暫時沒有支援 Windows 的計畫 (#6: Windows Support? – Issues – utahta/pythonbrew – GitHub)。所以 Windows 暫時還沒辦法使用 Pythonbrew 囉。
經過 easy_install
的安裝後,還需要在 shell 執行:
$ pythonbrew_install
才會把初始的設定檔和資料夾配置進你的家目錄。接著要修改 ~/.bashrc
的配置:
$ echo "source ~/.pythonbrew/etc/bashrc" >> ~/.bashrc
這樣就算安裝完全囉。
Pythonbrew 使用 curl
來抓取資料,如果你的系統沒有,請記得安裝。Ubuntu 上可以使用這行指令:
$ sudo apt-get install curl
因為 Pythonbrew 採取下載 tarball,並編譯、安裝的方法,所以我們要先為系統準備好編譯 Python 所需的套件。
也因為許多 Linux 發行版都已打包 Python,所以我們可以偷懶一點,用已經打包好的套件來解決編譯所需的相依性。在 Ubuntu/Debian 上,可以透過:
$ sudo apt-get build-dep python2.7
來安裝所有編譯 Python 2.7 所需的套件。雖然已經能夠安裝得相當完整,但還是缺少了 gdbm
這個 module,如果需要的話,可以透過:
$ sudo apt-get build-dep python-gdbm
來安裝編譯 gdbm
所需的套件。
註:bsddb185
、linuxaudiodev
、ossaudiodev
、sunaudiodev
等是按以上方式安裝後,仍會缺少的 module。其中 ossaudiodev
(Open Sound System)在隨 Ubuntu 發布的 Python 中有提供,列出來讓大家參考。
Fedora/CentOS/Redhat/openSUSE 則可以使用 yum-builddep
這個指令。
Pythonbrew 的操作不外乎安裝、移除、列出及使用新的 Python 版本,下面是依照初次使用時所需的指令順序來介紹。
首先我們用 list --know
列出可以安裝的 Python 版本:
$ pythonbrew list --know
接著利用 install VERSION
來下載並編譯 Python 到本機,除了接 Python 的版本編號以外,也可以接 Python 的 tarball 路徑或網址來安裝;也能調整編譯 Python 的選項。下面是一些例子:
$ pythonbrew install 2.7.2
$ pythonbrew install --verbose 2.7.2
$ pythonbrew install --force 2.7.2
$ pythonbrew install --no-test 2.7.2
$ pythonbrew install --configure="CC=gcc_4.1" 2.7.2
$ pythonbrew install --no-setuptools 2.7.2
$ pythonbrew install http://www.python.org/ftp/python/2.7/Python-2.7.2.tgz
$ pythonbrew install /path/to/Python-2.7.2.tgz
$ pythonbrew install /path/to/Python-2.7.2
$ pythonbrew install 2.7.2 3.2
下載的 Python tarball 會放在 ~/.pythonbrew/dists/
下;而編譯則會在~/.pythonbrew/build/
下進行。如果想清理這兩個目錄,可以使用:
$ pythonbrew cleanup
安裝好之後,可以使用 list
命令列出所有已安裝的 Python 版本:
$ pythonbrew list
後面有打星號的,就是現在正在使用的 Python 版本。
可以使用 switch
來切換預設的 Python 版本:
$ pythonbrew switch VERSION
如果只想在當前的 shell 下切換,可以使用 use
:
$ pythonbrew use VERSION
要切換回預設的環境時,使用 off
:
$ pythonbrew off
就會返回系統環境的 Python 了。
最重要的是,可以用系統內所有安裝過的 Python 版本,或指定的 Python 版本來測試自己的程式!
$ pythonbrew py test.py # 使用所有有安裝的版本
$ pythonbrew py -v test.py # 詳細輸出
$ pythonbrew py -p 2.7.2 -p 3.2 test.py # 指定特定的版本
若想移除已經安裝的 Python,則可以使用 uninstall
:
$ pythonbrew uninstall 2.7.2
$ pythonbrew uninstall 2.7.2 3.2
要注意 Pythonbrew 中所提供的 Virtualenv,是基於 Pythonbrew 中所安裝的 Python(置於~/.pythonbrew/venvs/Python-VERSION/
下)。在不使用 Pythonbrew 的情況下,無法使用附屬於 Pythonbrew 的 venv
功能。
Pythonbrew 提供了和 Virtualenvwrapper 類似的功能,只是沒有像 Virtualenvwrapper 那麼完整的 plugin 系統。所有在 Pythonbrew 中的 Virtualenv 指令都以 venv
作為第一個副命令。
$ pythonbrew venv create [指定虛擬環境的名稱]
$ pythonbrew venv list
$ pythonbrew venv use [指定虛擬環境的名稱]
$ pythonbrew venv delete [指定虛擬環境的名稱]
離開虛擬環境一樣是使用 deactivate
。
如果有使用 Buildout 這個工具,也可以透過 Pythonbrew 來執行:
$ pythonbrew buildout
$ pythonbrew buildout -p 2.6.6 # 指定版本
最後,Pythonbrew 有內建更新自己的指令:
$ pythonbrew update
$ pythonbrew update --master
$ pythonbrew update --develop
Virtualenv 和 Pythonbrew 就介紹到這邊,如果想獲得更多資訊,可以多多參考它們的官網哦。祝大家玩得愉快。
From: http://stackoverflow.com/questions/7496547/python-scipy-needs-blas
numpy.distutils.system_info.BlasNotFoundError:
Blas (http://www.netlib.org/blas/) libraries not found.
Directories to search for the libraries can be specified in the
numpy/distutils/site.cfg file (section [blas]) or by setting
the BLAS environment variable.
I guess you are talking about installation in ubuntu. Just use:
apt-get install python-numpy python-scipy
That should take care of the blas libraries compiling as well. Else, compiling blas libraries is very difficult.
If you need to use latest versions of Scipy rather than the packaged version, without going through the hassle of building BLAS and LAPACK, you can follow the below procedure.
Install linear algebra libraries from repository, (for Ubuntu)
sudo apt-get install gfortran libopenblas-dev liblapack-dev
Then install Scipy, (after downloading Scipy source) python setup.py install or
pip install scipy
As the case may be.
On Fedora, this works:
yum install f2py lapack lapack-devel blas blas-devel
pip install numpy
pip install scipy
Remember to install ‘lapack-devel’ and ‘blas-devel’ in addition to ‘blas’ and ‘lapack’ otherwise you’ll get the error you mentioned or the “numpy.distutils.system_info.LapackNotFoundError" error.
I am getting the:
IOError: decoder zip not available
when I try to draw an image and save to a jpeg in PIL. Any thoughts on how to resolve this? PIL has worked fine for me in the past, when it comes to viewing/uploading images.
It likely only needs the zip decoder to save the jpeg. I think I needed to follow these steps in OS X to preview jpegs.
It probably means you need to:
安裝缺少的圖檔解碼函式庫,之後再重新安裝PIL套件。
PIL才能識別先前的圖檔類型,將該圖檔進行解碼。
From: Python Excel Mini Cookbook
Python Excel Mini Cookbook
Posted on October 5, 2009
To get you started, I’ve illustrated a number of common tasks you can do with Python and Excel. Each program below is a self contained example, just copy it, paste it and run it. A few things to note:
These examples were tested in Excel 2007, they should work fine in earlier versions as well after changing the extension of the file within the wb.SaveAs() statement from .xlsx to .xls
If you’re new to this, I recommend typing these examples by hand into IDLE, IPython or the Python interpreter, then watching the effect in Excel as you enter the commands. To make Excel visible add the line excel.Visible = True after the excel =win32.gencache.EnsureDispatch(‘Excel.Application’) line in the script
These are simple examples with no error checking. Make sure the output files doesn’t exist before running the script. If the script crashes, it may leave a copy of Excel running in the background. Open the Windows Task Manager and kill the background Excel process to recover.
These examples contain no optimization. You typically wouldn’t use a for loop to iterate through data in individual cells, it’s provided here for illustration only.
Open Excel, Add a Workbook
The following script simply invokes Excel, adds a workbook and saves the empty workbook.
#
# Add a workbook and save (Excel 2007)
# For older versions of excel, use the .xls file extension
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
wb.SaveAs(‘add_a_workbook.xlsx’)
excel.Application.Quit()
Open an Existing Workbook
This script opens an existing workbook and displays it (note the statement excel.Visible =True). The file workbook1.xlsx must already exist in your “My Documents” directory. You can also open spreadsheet files by specifying the full path to the file as shown below. Using r’in the statement r’C:\myfiles\excel\workbook2.xlsx’ automatically escapes the backslash characters and makes the file name a bit more concise.
#
# Open an existing workbook
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Open(‘workbook1.xlsx’)
# Alternately, specify the full path to the workbook
# wb = excel.Workbooks.Open(r’C:\myfiles\excel\workbook2.xlsx’)
excel.Visible = True
Add a Worksheet
This script creates a new workbook with three sheets, adds a fourth worksheet and names it MyNewSheet.
#
# Add a workbook, add a worksheet,
# name it ‘MyNewSheet’ and save
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets.Add()
ws.Name = “MyNewSheet"
wb.SaveAs(‘add_a_worksheet.xlsx’)
excel.Application.Quit()
Ranges and Offsets
This script illustrates different techniques for addressing cells by using the Cells() and Range()operators. Individual cells can be addressed using Cells(row,column), where row is the row number, column is the column number, both start from 1. Groups of cells can be addressed using Range(), where the argument in the parenthesis can be a single cell denoted by its textual name (eg “A2″), a group noted by a textual name with a colon (eg “A3:B4″) or a group denoted with two Cells() identifiers (eg ws.Cells(1,1),ws.Cells(2,2)). The Offsetmethod provides a way to address a cell based on a reference to another cell.
#
# Using ranges and offsets
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
ws.Cells(1,1).Value = “Cell A1″
ws.Cells(1,1).Offset(2,4).Value = “Cell D2″
ws.Range(“A2″).Value = “Cell A2″
ws.Range(“A3:B4″).Value = “A3:B4″
ws.Range(“A6:B7,A9:B10″).Value = “A6:B7,A9:B10″
wb.SaveAs(‘ranges_and_offsets.xlsx’)
excel.Application.Quit()
Autofill Cell Contents
This script uses Excel’s autofill capability to examine data in cells A1 and A2, then autofill the remaining column of cells through A10.
#
# Autofill cell contents
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
ws.Range(“A1″).Value = 1
ws.Range(“A2″).Value = 2
ws.Range(“A1:A2″).AutoFill(ws.Range(“A1:A10″),win32.constants.xlFillDefault)
wb.SaveAs(‘autofill_cells.xlsx’)
excel.Application.Quit()
Cell Color
This script illustrates adding an interior color to the cell using Interior.ColorIndex. Column A, rows 1 through 20 are filled with a number and assigned that ColorIndex.
#
# Add an interior color to cells
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
for i in range (1,21):
ws.Cells(i,1).Value = i
ws.Cells(i,1).Interior.ColorIndex = i
wb.SaveAs(‘cell_color.xlsx’)
excel.Application.Quit()
Column Formatting
This script creates two columns of data, one narrow and one wide, then formats the column width with the ColumnWidth property. You can also use the Columns.AutoFit() function to autofit all columns in the spreadsheet.
#
# Set column widths
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
ws.Range(“A1:A10″).Value = “A"
ws.Range(“B1:B10″).Value = “This is a very long line of text"
ws.Columns(1).ColumnWidth = 1
ws.Range(“B:B").ColumnWidth = 27
# Alternately, you can autofit all columns in the worksheet
# ws.Columns.AutoFit()
wb.SaveAs(‘column_widths.xlsx’)
excel.Application.Quit()
Copying Data from Worksheet to Worksheet
This script uses the FillAcrossSheets() method to copy data from one location to all other worksheets in the workbook. Specifically, the data in the range A1:J10 is copied from Sheet1 to sheets Sheet2 and Sheet3.
#
# Copy data and formatting from a range of one worksheet
# to all other worksheets in a workbook
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
ws.Range(“A1:J10″).Formula = “=row()*column()"
wb.Worksheets.FillAcrossSheets(wb.Worksheets(“Sheet1″).Range(“A1:J10″))
wb.SaveAs(‘copy_worksheet_to_worksheet.xlsx’)
excel.Application.Quit()
Format Worksheet Cells
This script creates two columns of data, then formats the font type and font size used in the worksheet. Five different fonts and sizes are used, the numbers are formatted using a monetary format.
#
# Format cell font name and size, format numbers in monetary format
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
for i,font in enumerate([“Arial","Courier New","Garamond","Georgia","Verdana"]):
ws.Range(ws.Cells(i+1,1),ws.Cells(i+1,2)).Value = [font,i+i]
ws.Range(ws.Cells(i+1,1),ws.Cells(i+1,2)).Font.Name = font
ws.Range(ws.Cells(i+1,1),ws.Cells(i+1,2)).Font.Size = 12+i
ws.Range(“A1:A5″).HorizontalAlignment = win32.constants.xlRight
ws.Range(“B1:B5″).NumberFormat = “$###,##0.00″
ws.Columns.AutoFit()
wb.SaveAs(‘format_cells.xlsx’)
excel.Application.Quit()
Setting Row Height
This script illustrates row height. Similar to column height, row height can be set with the RowHeight method. You can also useAutoFit() to automatically adjust the row height based on cell contents.
#
# Set row heights and align text within the cell
#
import win32com.client as win32
excel = win32.gencache.EnsureDispatch(‘Excel.Application’)
wb = excel.Workbooks.Add()
ws = wb.Worksheets(“Sheet1″)
ws.Range(“A1:A2″).Value = “1 line"
ws.Range(“B1:B2″).Value = “Two\nlines"
ws.Range(“C1:C2″).Value = “Three\nlines\nhere"
ws.Range(“D1:D2″).Value = “This\nis\nfour\nlines"
ws.Rows(1).RowHeight = 60
ws.Range(“2:2″).RowHeight = 120
ws.Rows(1).VerticalAlignment = win32.constants.xlCenter
ws.Range(“2:2″).VerticalAlignment = win32.constants.xlCenter
# Alternately, you can autofit all rows in the worksheet
# ws.Rows.AutoFit()
wb.SaveAs(‘row_height.xlsx’)
excel.Application.Quit()
Prerequisites
Python (refer to http://www.python.org)
Win32 Python module (refer to http://sourceforge.net/projects/pywin32)
Microsoft Excel (refer to http://office.microsoft.com/excel)
Source Files and Scripts
Source for the program and data text file are available athttp://github.com/pythonexcels/examples
That’s all for now, thanks — Dan
出至:相似圖片搜索的原理
#!/usr/bin/python import glob import os import sys from PIL import Image EXTS = 'jpg', 'jpeg', 'JPG', 'JPEG', 'gif', 'GIF', 'png', 'PNG' def avhash(im): if not isinstance(im, Image.Image): im = Image.open(im) im = im.resize((8, 8), Image.ANTIALIAS).convert('L') avg = reduce(lambda x, y: x + y, im.getdata()) / 64. return reduce(lambda x, (y, z): x | (z << y), enumerate(map(lambda i: 0 if i < avg else 1, im.getdata())), 0) def hamming(h1, h2): h, d = 0, h1 ^ h2 while d: h += 1 d &= d - 1 return h if __name__ == '__main__': if len(sys.argv) <= 1 or len(sys.argv) > 3: print "Usage: %s image.jpg [dir]" % sys.argv[0] else: im, wd = sys.argv[1], '.' if len(sys.argv) < 3 else sys.argv[2] h = avhash(im) os.chdir(wd) images = [] for ext in EXTS: images.extend(glob.glob('*.%s' % ext)) seq = [] prog = int(len(images) > 50 and sys.stdout.isatty()) for f in images: seq.append((f, hamming(avhash(f), h))) if prog: perc = 100. * prog / len(images) x = int(2 * perc / 5) print '\rCalculating... [' + '#' * x + ' ' * (40 - x) + ']', print '%.2f%%' % perc, '(%d/%d)' % (prog, len(images)), sys.stdout.flush() prog += 1 if prog: print for f, ham in sorted(seq, key=lambda i: i[1]): print "%d\t%s" % (ham, f)
pip is a tool for installing and managing Python packages, such as those found in the Python Package Index. It’s a replacement for easy_install.
python 3 以上 字串的儲存預設已改為 unicode 格式,所以 u 界定符號已被放棄不用了。
透過網路開機 PXE 來安裝 Windows XP 、Windows 2003、Windows 2000 都能採用這樣的方法來做。以下就是使用 Ubuntu 來做為 NIS 伺服器的安裝 XP 的步驟。
Ubuntu 須要有兩個網路介面(對外、DHCP用),如果只有一個網路介面可用虛擬網卡設置。
僅一網卡的設置,可能要移除 network-manager 並重新設定網路配置產生虛擬網卡。
sudo apt-get purge network-manager sudo vim /etc/network/interface #######/etc/network/interface############# auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.128.119 netmask 255.255.255.0 gateway 192.168.128.1 auto eth0:0 iface eth0:0 inet static address 192.168.101.1 netmask 255.255.255.0 ########################################## sudo /etc/init.d/networking restart
Ubuntu 10.04 安裝必要的套件 dhcpd 、tftp-hpa、syslinux、samba。
sudo apt-get install dhcp3-server tftpd-hpa syslinux samba
sudo apt-get install python-setuptools hg clone https://google-api-python-client.googlecode.com/hg/ google-api-python-client cd google-api-python-client sudo python setup.py install
p.s: 目前 python easy_install 也就是 python-setuptools 套件僅支援到 2.7 的版本。