How do I find the location of my Python site-packages directory?

前端 未结 21 3002
梦谈多话
梦谈多话 2020-11-22 03:06

How do I find the location of my site-packages directory?

21条回答
  •  刺人心
    刺人心 (楼主)
    2020-11-22 03:33

    Answer to old question. But use ipython for this.

    pip install ipython
    ipython 
    import imaplib
    imaplib?
    

    This will give the following output about imaplib package -

    Type:        module
    String form: 
    File:        /usr/lib/python2.7/imaplib.py
    Docstring:  
    IMAP4 client.
    
    Based on RFC 2060.
    
    Public class:           IMAP4
    Public variable:        Debug
    Public functions:       Internaldate2tuple
                            Int2AP
                            ParseFlags
                            Time2Internaldate
    

提交回复
热议问题