Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to distinguish between pip installed packages and those from teh system package manager in pip list when not in a virtualenv #949

Closed
alex opened this issue May 19, 2013 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation C: list/show 'pip list' or 'pip show' good first issue A good item for first time contributors to work on
Milestone

Comments

@alex
Copy link
Member

alex commented May 19, 2013

@dstufft suggested I file this.

@ncoghlan
Copy link
Member

In theory, the PEP 376 INSTALLER file should allow pip to determine this. Even if other tools set it incorrectly (or don't set it at all), pip should be able to distinguish between "installed by pip" and "installed by something else".

@pnasrat
Copy link
Contributor

pnasrat commented Jul 14, 2013

Interesting - should make it visible in pip show also

@xavfernandez
Copy link
Member

xavfernandez commented Mar 22, 2017

Interesting - should make it visible in pip show also

This is now the case with pip show --verbose your_pkg.

@pfmoore
Copy link
Member

pfmoore commented Apr 4, 2017

@alex Is pip show --verbose pkg sufficient for you? It's also possible to get this information with a short script using pkg_resources:

from pkg_resources import working_set
for dist in working_set:
    print(f"{dist.project_name} {dist.version} {dist.location} {dist.get_metadata('installer').strip()}")

Is that sufficient, or do you need more?

xavfernandez pushed a commit that referenced this issue Apr 6, 2017
* Showed installers when list command runs with -vv option

* Added news entry

* Updated code to show both location and installer of a package when '-v' is used

* Removed installer from freeze format

* Moved get_installer function to pip.utils.packaging
@xavfernandez
Copy link
Member

Closed by #4414.
pip list -v will now print the installer.

@xavfernandez xavfernandez added this to the 10.0 milestone Apr 6, 2017
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: list/show 'pip list' or 'pip show' good first issue A good item for first time contributors to work on
Projects
None yet
Development

No branches or pull requests

5 participants