Last-modified: 2011-12-26 (月) 01:24:44
Python/モジュールをインストールしたい

概要

Pythonのモジュールをインストールします。
ここでは例として、simpeljsonを使います。

手順

  1. simplejsonをダウンロードします。
    http://pypi.python.org/pypi/simplejson
    Everything is expanded.Everything is shortened.
      1
      2
    
    -
    !
    
    # 検証の際に使ったURLです。最新のパスとは異なる可能性があります。
    wget http://pypi.python.org/packages/source/s/simplejson/simplejson-2.1.2.tar.gz#md5=a856f9ae9ab3749991a93ddeafadc554
    
  2. 展開して、移動します。
    Everything is expanded.Everything is shortened.
      1
      2
    
     
     
    
    tar zxvf simplejson-2.1.2.tar.gz
    cd simplejson-2.1.2
  3. インストールします。
    Everything is expanded.Everything is shortened.
      1
    
     
    
    python setup.py install
  4. pythonインタプリタを起動して、import出来るか確認します。
    Everything is expanded.Everything is shortened.
      1
      2
    
    -
    !
    
    # エラーが出なければ成功です。
    import simplejson

検証時の環境

参考