天天看點

在64位Windows Server 2008 R2上安裝mtools

在64位Windows Server 2008 R2上安裝mtools

該安裝向導提供了循序漸進的指南,用于在Microsoft Windows Server 2008 R2上安裝mtools。

前提

  • Windows Powershell需要被安裝。
  • 該主機必需能通路網際網路。

安裝步驟

1. 下載下傳和安裝Python 2.7.x(目前版本2.7.10)

a) 進入https://www.python.org/downloads/

b) 選擇最新的2.7.x目錄。

c) 下載下傳Windows x86-64 MSI Installer(不是32位Windows x86 MSI Installer)。

d) 在安裝過程中,包含“Add python.exe to Path”選項(預設被禁用)。  

注意:可通過Powershell來驗證和設定PATH環境變量,詳細内容可參見《Powershell環境變量》。    

顯示PATH環境變量的值:    

PS> $env:PATH    

設定主機上PATH環境變量的值:    

PS> [environment]::SetEnvironmentvariable(“PATH”,”;C:\Python27;C:\Python27\Scripts”,”User”)    

PS> [environment]::GetEnvironmentvariable(“PATH”,”User”)    

驗證環境變量已成功配置:    

在64位Windows Server 2008 R2上安裝mtools

2. 下載下傳和安裝matplotlib 1.4.x(目前版本1.4.3)

a) 進入http://matplotlib.org/downloads.html并下載下傳matplotlib-1.4.3.win-and64-py2.7.exe

b) 安裝matplotlib。

3. 下載下傳和安裝NumPy 1.9.x(目前版本1.9.2)

a) 沒有可用的64位二進制安裝包(從這裡檢視原因),但是一個非官方的二進制檔案可以在這裡找到http://www.lfd.uci.edu/%7Egohlke/pythonlibs/#numpy。

b) 下載下傳numpy-1.9.2+mkl-cp27-none-win_amd64.whl。

c) 在Powershell,修改到下載下傳路徑下,安裝:  

pip.exe install numpy-1.9.2+mkl-cp27-none-win_amd64.whl    

在64位Windows Server 2008 R2上安裝mtools

4. 通過pip安裝pyparsing

a) 在Powershell,運作:  

pip.exe install pyparsing    

在64位Windows Server 2008 R2上安裝mtools

5. 通過pip安裝mtools

a) 在PowerShell,運作:  

pip.exe install mtools    

在64位Windows Server 2008 R2上安裝mtools

用法

你現在可以從Powershell運作mtools腳本工具mloginfo.exe、mlogfilter.exe、mplotqueries.exe和mlogvis.exe。注意mlaunch目前不支援Windows平台。

示例Powershell指令: