See when packages were installed / updated using pip

后端 未结 7 1625
说谎
说谎 2020-12-13 06:32

I know how to see installed Python packages using pip, just use pip freeze. But is there any way to see the date and time when package is installed or updated w

相关标签:
7条回答
  • 2020-12-13 07:09

    I was recently looking for this too. But although there are many good answers here, the real issue is that since pip is not keeping logs by default, we have to resort to using the file creation and modification times, known as ctime and mtime, respectively. (See MAC-times.) Unfortunately, using this method has two side effects:

    1. Different OS's and FS's handles the ctime/mtime differently (if even available)
    2. Python installations are using many different directories, and some remain after installations while others are created on the fly when running. Making it hard to know exaclty what files to check the dates on.

    However, there is a tool called pip-date that try to combine a few different methods.

    pip install pip-date


    0 讨论(0)
提交回复
热议问题