Python 설치된 모듈 목록

Python 설치 모듈 목록 확인

1 방법 1: pydoc[편집]

[root@zetawiki ~]# pydoc modules

Please wait a moment while I gather a list of all available modules...

BaseHTTPServer      ast                 imp                 shlex
Bastion             asynchat            importlib           shutil
CDROM               asyncore            imputil             signal
... (생략)
anydbm              ihooks              sgmllib             
argparse            imaplib             sha                 
array               imghdr              shelve              

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

2 방법 2: help[편집]

  • 명령어가 다를 뿐 결과는 방법 1과 거의 같음
[root@zetawiki ~]# python -c 'help("modules")'

Please wait a moment while I gather a list of all available modules...

ANSI                bisect              io                  screen
BaseHTTPServer      bsddb               itertools           select
Bastion             bz2                 itsdangerous        sets
... (생략)

3 방법 3: pip[편집]

  • pip가 설치되어 있어야 함
  • 기본 내장 모듈은 나오지 않음
[root@zetawiki ~]# pip list
distribute (0.6.10)
Django (1.6.5)
Flask (0.10.1)
iniparse (0.3.1)
itsdangerous (0.24)
Jinja2 (2.7.3)
MarkupSafe (0.23)
MySQL-python (1.2.3)
pexpect (2.3)
pycurl (7.19.0)
pygpgme (0.1)
simplejson (3.5.3)
urlgrabber (3.9.1)
Werkzeug (0.9.6)
[root@zetawiki ~]# pip freeze
Django==1.6.5
Flask==0.10.1
Jinja2==2.7.3
MarkupSafe==0.23
MySQL-python==1.2.3
Werkzeug==0.9.6
distribute==0.6.10
iniparse==0.3.1
itsdangerous==0.24
pexpect==2.3
pycurl==7.19.0
pygpgme==0.1
simplejson==3.5.3
urlgrabber==3.9.1
yum-metadata-parser==1.1.2

4 방법 4: get_installed_distributions[편집]

  • pip가 설치되어 있어야 함
  • 기본 내장 모듈은 나오지 않음
  • 설치 위치 확인 가능
[root@zetawiki ~]# python -c 'import pip,pprint; pprint.pprint(pip.get_installed_distributions())'
[MySQL-python 1.2.3 (/usr/lib64/python2.6/site-packages/MySQL_python-1.2.3-py2.6-linux-x86_64.egg),
 Flask 0.10.1 (/usr/lib/python2.6/site-packages/Flask-0.10.1-py2.6.egg),
 itsdangerous 0.24 (/usr/lib/python2.6/site-packages/itsdangerous-0.24-py2.6.egg),
 Jinja2 2.7.3 (/usr/lib/python2.6/site-packages/Jinja2-2.7.3-py2.6.egg),
 Werkzeug 0.9.6 (/usr/lib/python2.6/site-packages/Werkzeug-0.9.6-py2.6.egg),
 MarkupSafe 0.23 (/usr/lib/python2.6/site-packages/MarkupSafe-0.23-py2.6-linux-x86_64.egg),
 simplejson 3.5.3 (/usr/lib/python2.6/site-packages/simplejson-3.5.3-py2.6-linux-x86_64.egg),
 pygpgme 0.1 (/usr/lib64/python2.6/site-packages),
 pycurl 7.19.0 (/usr/lib64/python2.6/site-packages),
 yum-metadata-parser 1.1.2 (/usr/lib64/python2.6/site-packages),
 distribute 0.6.10 (/usr/lib/python2.6/site-packages),
 iniparse 0.3.1 (/usr/lib/python2.6/site-packages),
 urlgrabber 3.9.1 (/usr/lib/python2.6/site-packages),
 Django 1.6.5 (/usr/lib/python2.6/site-packages),
 pexpect 2.3 (/usr/lib/python2.6/site-packages)]

5 같이 보기[편집]

6 참고[편집]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}