|
|
金子邦彦研究室: データベース、人工知能(AI)、データサイエンスの融合により不可能を可能にする |
Windows での Python 3 のインストール手順を説明します。
目次
ページの上の方にある「Downloads」をクリック
下の方にある 「Windows」をクリック
インストーラを起動. 「Install for all users」のままでよい. Next をクリック.
ディレクトリの選択は,デフォルトのままでよい.
「Add python.exe to Path」にチェックする.
「マイコンピュータ」 → 「プロパティ」 → 「詳細設定」 → 「環境変数」のように 操作し、次のように設定する
<設定例>
コマンドプロンプトを開き、次のコマンドを実行 (Open Cmd.exe, and do the following command)
pip install -U setuptools
C:\python34\python
下の実行例では、バージョン番号として「1600」が表示されている (In the following example, the version number is 1600).
from distutils.msvc9compiler import * get_build_version()
先ほど表示されたバージョン番号(1600)と一致することを確認しておく. (The result of this step is equal to the compiler version number in the previous step?)
同意できる場合のみダウンロードする
「マイコンピュータ」 → 「プロパティ」 → 「詳細設定」 → 「環境変数」のように 操作し、次のように設定する
<設定例>
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 pip install -U %i
pip の実行時に次のようなエラーがでる場合がある.
error: Unable to find vcvarsall.bat
このエラーが出たときは、setuptools の更新を行う
pip install -U setuptools
pip install spyder
起動してみる
%module example
%{
#define SWIG_FILE_WITH_INIT
#include "example.h"
%}
int fact(int n);