差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
| python:python_install_xrea [2009/05/17 14:46] – ともやん | python:python_install_xrea [2019/08/19 07:01] (現在) – ともやん | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| ====== Python のインストール(Xrea編) ====== | ====== Python のインストール(Xrea編) ====== | ||
| + | |||
| ===== Python 2.6.2をソースからビルドする ===== | ===== Python 2.6.2をソースからビルドする ===== | ||
| - sshにてログインする。< | - sshにてログインする。< | ||
| 行 5: | 行 6: | ||
| username@sxxx.xrea.com' | username@sxxx.xrea.com' | ||
| Last login: Sun May 17 08:44:04 2009 from xxxxx.xxxxx.co.jp | Last login: Sun May 17 08:44:04 2009 from xxxxx.xxxxx.co.jp | ||
| - | username@sxxx: | + | $ |
| </ | </ | ||
| - 作業用のディレクトリを作成し移動する。< | - 作業用のディレクトリを作成し移動する。< | ||
| - | username@sxxx: | + | $ mkdir tmp |
| - | username@sxxx: | + | $ cd ~/tmp |
| - | username@sxxx: | + | |
| </ | </ | ||
| - Pythonをダウンロードする。< | - Pythonをダウンロードする。< | ||
| - | username@sxxx: | + | $ wget http:// |
| --2009-05-17 11: | --2009-05-17 11: | ||
| Resolving www.python.org... 82.94.164.162, | Resolving www.python.org... 82.94.164.162, | ||
| 行 26: | 行 26: | ||
| </ | </ | ||
| - 圧縮ファイルを展開する。< | - 圧縮ファイルを展開する。< | ||
| - | username@sxxx: | + | $ tar xvjf Python-2.6.2.tar.bz2 |
| Python-2.6.2/ | Python-2.6.2/ | ||
| Python-2.6.2/ | Python-2.6.2/ | ||
| 行 33: | 行 33: | ||
| </ | </ | ||
| - Pythonをビルドするための準備をする。< | - Pythonをビルドするための準備をする。< | ||
| - | username@sxxx: | + | $ cd Python-2.6.2 |
| - | username@sxxx: | + | $ ./configure --prefix=/ |
| checking for --with-universal-archs... 32-bit | checking for --with-universal-archs... 32-bit | ||
| checking MACHDEP... linux2 | checking MACHDEP... linux2 | ||
| 行 41: | 行 41: | ||
| </ | </ | ||
| - Pythonをビルドする。< | - Pythonをビルドする。< | ||
| - | username@sxxx: | + | $ make install |
| gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes | gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes | ||
| -I. -IInclude -I./ | -I. -IInclude -I./ | ||
| 行 48: | 行 48: | ||
| ~省略~ | ~省略~ | ||
| </ | </ | ||
| + | |||
| ===== 環境変数の設定 ===== | ===== 環境変数の設定 ===== | ||
| - vi で ~/.bashrc を作成する。< | - vi で ~/.bashrc を作成する。< | ||
| - | username@sxxx: | + | $ vi .bashrc |
| </ | </ | ||
| 行 60: | 行 61: | ||
| ===== Python のバージョンを確認 ===== | ===== Python のバージョンを確認 ===== | ||
| - bash を起動して python のバージョンを表示する。< | - bash を起動して python のバージョンを表示する。< | ||
| - | username@sxxx: | + | $ bash |
| - | username@sxxx: | + | $ python -V |
| Python 2.6.2 | Python 2.6.2 | ||
| </ | </ | ||
| 行 67: | 行 68: | ||
| ===== easy_install の導入 ===== | ===== easy_install の導入 ===== | ||
| - ez_setup.py をダウンロードする。< | - ez_setup.py をダウンロードする。< | ||
| - | username@sxxx: | + | $ cd ~/tmp |
| - | username@sxxx: | + | $ wget http:// |
| wget http:// | wget http:// | ||
| --2009-05-17 14: | --2009-05-17 14: | ||
| 行 83: | 行 84: | ||
| - ez_setup.py を実行する。< | - ez_setup.py を実行する。< | ||
| - | username@sxxx: | + | $ python ez_setup.py |
| ez_setup.py: | ez_setup.py: | ||
| except ImportError: | except ImportError: | ||