以前、easy_install をインストールしたけど、最近ではパッケージ管理に pip を使うのが一般的のようだ。
pip 自体は easy_install を使ってインストールする。
^o^ > python -m easy_install pip Searching for pip Reading http://pypi.python.org/simple/pip/ Best match: pip 1.3.1 Downloading https://pypi.python.org/packages/source/p/pip/pip-1.3.1.tar.gz#md5=c bb27a191cebc58997c4da8513863153 Processing pip-1.3.1.tar.gz Writing c:\users\hiro\appdata\local\temp\easy_install-aqy3vi\pip-1.3.1\setup.cfg Running pip-1.3.1\setup.py -q bdist_egg --dist-dir c:\users\hiro\appdata\local\t emp\easy_install-aqy3vi\pip-1.3.1\egg-dist-tmp-ja6n4k warning: no files found matching '*.html' under directory 'docs' warning: no previously-included files matching '*.txt' found under directory 'do cs\_build' no previously-included directories found matching 'docs\_build\_sources' Adding pip 1.3.1 to easy-install.pth file Installing pip-script.py script to C:\Python27\Scripts Installing pip.exe script to C:\Python27\Scripts Installing pip-2.7-script.py script to C:\Python27\Scripts Installing pip-2.7.exe script to C:\Python27\Scripts Installed c:\python27\lib\site-packages\pip-1.3.1-py2.7.egg Processing dependencies for pip Finished processing dependencies for pip
なにやらメッセージがいろいろ出て、無事インストールできたようだ。
^o^ > pip --version pip 1.3.1 from c:\python27\lib\site-packages\pip-1.3.1-py2.7.egg (python 2.7)
ためしに、テンプレートエンジンの Jinja2 をインストールしてみる。
^o^ > pip install jinja2
Downloading/unpacking jinja2
Downloading Jinja2-2.7.tar.gz (377kB): 377kB downloaded
Running setup.py egg_info for package jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
warning: no previously-included files matching '*.pyc' found under directory
'jinja2'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'jinja2'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
Downloading/unpacking markupsafe (from jinja2)
Downloading MarkupSafe-0.18.tar.gz
Running setup.py egg_info for package markupsafe
Installing collected packages: jinja2, markupsafe
Running setup.py install for jinja2
warning: no files found matching '*' under directory 'custom_fixers'
warning: no previously-included files matching '*' found under directory 'do
cs\_build'
warning: no previously-included files matching '*.pyc' found under directory
'jinja2'
warning: no previously-included files matching '*.pyc' found under directory
'docs'
warning: no previously-included files matching '*.pyo' found under directory
'jinja2'
warning: no previously-included files matching '*.pyo' found under directory
'docs'
Running setup.py install for markupsafe
building 'markupsafe._speedups' extension
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Failure information, if any, is above.
Retrying the build without the C extension now.
==========================================================================
WARNING: The C extension could not be compiled, speedups are not enabled.
Plain-Python installation succeeded.
==========================================================================
Successfully installed jinja2 markupsafe
Cleaning up...
C extension がコンパイルできない、と言う警告が出てるけど、Plain-Python のインストールが成功した、と書いてある。一応成功みたいだ。
pip list コマンドで見てみると、Jinja2 のほかに MarkupSafe と言うパッケージがインストールされている。どうやら依存しているパッケージみたい。
^o^ > pip list distribute (0.6.36) Jinja2 (2.7) MarkupSafe (0.18)