How can I get a list of locally installed Python modules?

前端 未结 30 2225
庸人自扰
庸人自扰 2020-11-22 04:32

I would like to get a list of Python modules, which are in my Python installation (UNIX server).

How can you get a list of Python modules installed in your computer?

30条回答
  •  被撕碎了的回忆
    2020-11-22 05:04

    This will help

    In terminal or IPython, type:

    help('modules')
    

    then

    In [1]: import                      #import press-TAB
    Display all 631 possibilities? (y or n)
    ANSI                   audiodev               markupbase
    AptUrl                 audioop                markupsafe
    ArgImagePlugin         avahi                  marshal
    BaseHTTPServer         axi                    math
    Bastion                base64                 md5
    BdfFontFile            bdb                    mhlib
    BmpImagePlugin         binascii               mimetools
    BufrStubImagePlugin    binhex                 mimetypes
    CDDB                   bisect                 mimify
    CDROM                  bonobo                 mmap
    CGIHTTPServer          brlapi                 mmkeys
    Canvas                 bsddb                  modulefinder
    CommandNotFound        butterfly              multifile
    ConfigParser           bz2                    multiprocessing
    ContainerIO            cPickle                musicbrainz2
    Cookie                 cProfile               mutagen
    Crypto                 cStringIO              mutex
    CurImagePlugin         cairo                  mx
    DLFCN                  calendar               netrc
    DcxImagePlugin         cdrom                  new
    Dialog                 cgi                    nis
    DiscID                 cgitb                  nntplib
    DistUpgrade            checkbox               ntpath
    

提交回复
热议问题