Skip to content

Add a routine to refresh the working set #373

@ghost

Description

Originally reported by: stonebig (Bitbucket: stonebig, GitHub: stonebig)


Hi,

I'm using this to get list of current package.

pip.get_installed_distributions()

Unfortunately:

  • it doesn't refresh if I add a package via another process,
  • I didn't find an option .refresh()
  • trying to trick by importing pip under a different name didn't work,
  • so I currently use a complex workaround (launching another separate python session).

rbtcollins pointed me to pkg_resources API, here, but the document is obscure for me.

Could you spare a few minutes to give me an example on how to obtain the wished effect ?

see pypa/pip#2695 (comment)


Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions