简体   繁体   中英

How do I get the latest packages installed by pip/conda?

I want to troubleshoot my environment which may have been affected by recently installed packages.

You can do something like this:

import os
import time
from pip._internal.utils.misc import get_installed_distributions

for package in get_installed_distributions():
    print ("{}\t{}".format(time.ctime(os.path.getctime(package.location)), package))

Or you can use pip-date .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM