金子邦彦研究室インストールWindows の種々のソフトウェア(インストール)Windows で Python(x,y) 2.7.10 と各種パッケージのインストール

Windows で Python(x,y) 2.7.10 と各種パッケージのインストール

Windows での,Python(x,y) 2.7.10 と各種パッケージのインストール手順を説明する.

Python(x,y) は次のソフトウェアを一体化したもの (Python(x,y) is a collection of following softwares).

このページでは、Python(x,y)と、Python の各種パッケージのインストールを行う. (In this Web page, we install Python(x,y), several Python packages.)

目次 (Index)

  1. Python(x,y) のダウンロードとインストール (Download and Install Python(x,y)
  2. Python のビルドに用いられたコンパイラの確認 (Examine the compilers that were used to build python on Windows)
  3. Python パッケージのインストール (Install / Upgrade Recommended Python Packages)

Python(x,y) のダウンロードとインストール (Download and Install Python(x,y))

  1. Python(x,y) の Web ページを開く (Open the Python(x,y) Web page)

    http://python-xy.github.io

  2. 「Download Python-xy」をクリック (click "Download Python-xy")

    [image]
  3. ダウンロードサイトを選ぶ (select download site)

    [image]
  4. ダウンロードの開始 (start download)

    ダウンロードが終わるまで,しばらく待つ.

    [image]
  5. ダウンロードしたインストーラを起動 (launch the installer)

    [image]
  6. ライセンス条項の確認 (license agreement)

    ライセンス条項に同意できる場合のみ次に進む

    [image]
  7. ユーザの選択 (choose user)

    [image]
  8. コンポーネントの選択 (choose components)

    Python と Others にチェックする (Check Python and Others)

    [image]
  9. インストールディレクトリ (Install Directory)

    分かりやすいディレクトリにインストールしたほうが良いので,C:\pythonxy に変える (Set "C:\pythonxy")

    [image]
  10. インストール開始 (Start Install)

    インストール終了までしばらく待つ.

  11. インストール終了 (Install Completed)

    [image]

    [image]
  12. pip と setuptools の更新

    Windows では,コマンドプロン プトを管理者として実行し, 次のコマンドを実行する.

    Windowspip を実行するときは,コマンドプロンプト管理者として開き,それを使って pip を実行することにする.

    python -m pip install -U pip setuptools
    
  13. 試しに Python を起動してみる (Try to launch Python)
    python 
    1 + 2
    exit()
    

    [image]
  14. 確認 (Examine)
  15. 確認のため spyder を起動してみる (Try to launch spyder)

    [image]
  16. 確認のため "ipython qtconsole" を実行してみる (Try to do "ipython qtconsole")

    [image]

    新しい画面が開く

    [image]
  17. 環境変数 PATH の確認

    念のため、python, python\scripts, python\lib\site-packages にパスが通っているかの確認を行なっておく

    echo %PATH% 
    

Python のビルドに用いられたコンパイラの確認 (Examine the compilers that were used to build python on Windows)

  1. Python を起動し、Python のビルドに用いられたコンパイラのバージョン番号を確認 (The version number of the compiler that is used to build the Python system)
    python
    

    下の実行例では、バージョン番号として「1500」が表示されている (In the following example, the version number is 1500).

    [image]
  2. Python の distuitls パッケージに設定されているバージョン番号を確認 (Display the compiler version number that is set in the distutils package)
    from distutils.msvc9compiler import *
    get_build_version()
    

    [image]

    先ほど表示されたバージョン番号(1500)と一致することを確認しておく. (The result of this step is equal to the compiler version number in the previous step?)

Python パッケージのインストール (Install / Upgrade Recommended Python Packages)

インストールしておきたいおすすめパッケージ.

  1. コマンドプロンプトを開き、次のコマンドを実行 (Open Cmd.exe, and do the following command)
    for %i in (setuptools sphinx numpy bottleneck scipy matplotlib ipython pygments pandas theano pillow ggplot prettyplotlib pygraphviz seaborn gloo statsmodels qgis orange scikit-image scikit-learn scikit-video scikits.statsmodels scikits.datasmooth scikits.example scikits.fitting scikits.learn scikits.optimization scikits.pulsefit scikits.timeseries scikits.vectorplot bottle numexpr xlrd xlsxwriter zodb lxml beautifulsoup gdata) do python -m pip install -U %i
    

    pip の実行時に次のようなエラーがでる場合がある.

    error: Unable to find vcvarsall.bat
    

    このエラーが出たときは、setuptools の更新を行う

    python -m pip install -U setuptools
    
  2. 終了の確認 (Finish installation)

    エラーメッセージが出ていないこと.