• <small id='guZLj'></small><noframes id='guZLj'>

  • <tfoot id='guZLj'></tfoot>

      <i id='guZLj'><tr id='guZLj'><dt id='guZLj'><q id='guZLj'><span id='guZLj'><b id='guZLj'><form id='guZLj'><ins id='guZLj'></ins><ul id='guZLj'></ul><sub id='guZLj'></sub></form><legend id='guZLj'></legend><bdo id='guZLj'><pre id='guZLj'><center id='guZLj'></center></pre></bdo></b><th id='guZLj'></th></span></q></dt></tr></i><div id='guZLj'><tfoot id='guZLj'></tfoot><dl id='guZLj'><fieldset id='guZLj'></fieldset></dl></div>

      • <bdo id='guZLj'></bdo><ul id='guZLj'></ul>

    1. <legend id='guZLj'><style id='guZLj'><dir id='guZLj'><q id='guZLj'></q></dir></style></legend>

        获取通过 pip 安装的软件包的安装日期和时间

        时间:2023-09-13

          <tbody id='Fc9EQ'></tbody>

      1. <small id='Fc9EQ'></small><noframes id='Fc9EQ'>

          <legend id='Fc9EQ'><style id='Fc9EQ'><dir id='Fc9EQ'><q id='Fc9EQ'></q></dir></style></legend><tfoot id='Fc9EQ'></tfoot>
            <bdo id='Fc9EQ'></bdo><ul id='Fc9EQ'></ul>

            • <i id='Fc9EQ'><tr id='Fc9EQ'><dt id='Fc9EQ'><q id='Fc9EQ'><span id='Fc9EQ'><b id='Fc9EQ'><form id='Fc9EQ'><ins id='Fc9EQ'></ins><ul id='Fc9EQ'></ul><sub id='Fc9EQ'></sub></form><legend id='Fc9EQ'></legend><bdo id='Fc9EQ'><pre id='Fc9EQ'><center id='Fc9EQ'></center></pre></bdo></b><th id='Fc9EQ'></th></span></q></dt></tr></i><div id='Fc9EQ'><tfoot id='Fc9EQ'></tfoot><dl id='Fc9EQ'><fieldset id='Fc9EQ'></fieldset></dl></div>
                • 本文介绍了获取通过 pip 安装的软件包的安装日期和时间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  我想找到一种方法来获取我通过 pip 安装的包的小时:分钟:秒格式的日历日期和时间.

                  I would like to find a way to get the calendar date and time in hour:minute:seconds format for my packages installed via pip.

                  我希望能够在输出中看到如下内容:月/日/年 - 时:分:秒对于每个包.

                  I would like to be able to see something in output like: Month/Day/Year - Hour:Minute:Seconds for each package.

                  谢谢!

                  推荐答案

                  这是你要找的 -

                  import pip
                  import os
                  import time
                  
                  In [139]: for package in pip.get_installed_distributions():
                     .....:          print "%s: %s" % (package, time.ctime(os.path.getctime(package.location)))
                     .....:     
                  pyudev 0.17.dev20150317: Tue Mar 17 12:02:58 2015
                  python-magic 0.4.6: Fri Mar 20 14:07:59 2015
                  runipy 0.1.0: Fri Oct 31 01:49:34 2014
                  

                  代码来源 - https://stackoverflow.com/a/24736563/170005

                  import pip 也可以,非常有趣.我不知道这个.

                  You can do import pip too, which is pretty interesting. I didn't know this.

                  这篇关于获取通过 pip 安装的软件包的安装日期和时间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:从不同层次结构中导入 Python 模块 下一篇:pip 正则表达式搜索

                  相关文章

                  最新文章

                  <tfoot id='Q3ElL'></tfoot>

                  <legend id='Q3ElL'><style id='Q3ElL'><dir id='Q3ElL'><q id='Q3ElL'></q></dir></style></legend>
                  <i id='Q3ElL'><tr id='Q3ElL'><dt id='Q3ElL'><q id='Q3ElL'><span id='Q3ElL'><b id='Q3ElL'><form id='Q3ElL'><ins id='Q3ElL'></ins><ul id='Q3ElL'></ul><sub id='Q3ElL'></sub></form><legend id='Q3ElL'></legend><bdo id='Q3ElL'><pre id='Q3ElL'><center id='Q3ElL'></center></pre></bdo></b><th id='Q3ElL'></th></span></q></dt></tr></i><div id='Q3ElL'><tfoot id='Q3ElL'></tfoot><dl id='Q3ElL'><fieldset id='Q3ElL'></fieldset></dl></div>

                  <small id='Q3ElL'></small><noframes id='Q3ElL'>

                        <bdo id='Q3ElL'></bdo><ul id='Q3ElL'></ul>