2011年11月28日月曜日

[Python][Mining the Social Web] easy_installでモジュール追加

Mining the Social Web(オライリー刊)を参考に分析を進めていくための準備

Pythonでモジュール管理はeasy_installを使用するのがベター。
Macでも変わらない。

NetworkXモジュールはグラフを作り、分析し、類似する出力を観察するために使用するようだ。
$ sudo easy_install networkx
Searching for networkx
Reading http://pypi.python.org/simple/networkx/
Reading http://networkx.lanl.gov/
Reading http://networkx.lanl.gov/download/networkx
Reading http://sourceforge.net/project/showfiles.php?group_id=122233
Reading https://networkx.lanl.gov
Reading http://networkx.lanl.gov/download
Reading http://networkx.lanl.gov
Best match: networkx 1.6
Downloading http://networkx.lanl.gov/download/networkx/networkx-1.6-py2.7.egg
Processing networkx-1.6-py2.7.egg
creating /Library/Python/2.7/site-packages/networkx-1.6-py2.7.egg
Extracting networkx-1.6-py2.7.egg to /Library/Python/2.7/site-packages
Adding networkx 1.6 to easy-install.pth file

Installed /Library/Python/2.7/site-packages/networkx-1.6-py2.7.egg
Processing dependencies for networkx
Finished processing dependencies for networkx

Numpyは科学計算用ツール。NetworkXが依存関係にある。
$ sudo easy_install numpy
Searching for numpy
Best match: numpy 1.5.1
Adding numpy 1.5.1 to easy-install.pth file

Using /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Processing dependencies for numpy
Finished processing dependencies for numpy

NoseはPythonのテストツール
$ sudo easy_install nose
Searching for nose
Reading http://pypi.python.org/simple/nose/
Reading http://somethingaboutorange.com/mrl/projects/nose/
Reading http://readthedocs.org/docs/nose/
Best match: nose 1.1.2
Downloading http://pypi.python.org/packages/source/n/nose/nose-1.1.2.tar.gz#md5=144f237b615e23f21f6a50b2183aa817
Processing nose-1.1.2.tar.gz
Running nose-1.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-UusYYV/nose-1.1.2/egg-dist-tmp-UafvfE
Adding nose 1.1.2 to easy-install.pth file
Installing nosetests script to /usr/local/bin
Installing nosetests-2.7 script to /usr/local/bin

Installed /Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg
Processing dependencies for nose
Finished processing dependencies for nose


以上です。

0 件のコメント:

コメントを投稿