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

Distinguish between PyPI and Debian python packages #2011

Closed
szepeviktor opened this issue Sep 1, 2014 · 5 comments
Closed

Distinguish between PyPI and Debian python packages #2011

szepeviktor opened this issue Sep 1, 2014 · 5 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@szepeviktor
Copy link
Contributor

Good morning!

Could you help me to get pip freeze to display only packages installed by pip and to exclude packages coming from a Debian package?

The only way I've found is filename.startswith('/usr/local/lib/python')

Could you integrate it into a pip option?

jazzband/pip-tools#109 (comment)
jazzband/pip-tools#96

@szepeviktor szepeviktor changed the title distinguish between PyPI and Debian python pacakges distinguish between PyPI and Debian python packages Sep 1, 2014
@szepeviktor
Copy link
Contributor Author

It is not --local.

# pip freeze|wc -l
81
# pip freeze --local|wc -l
81

Debian wheezy

@szepeviktor
Copy link
Contributor Author

Will it work?

import pip
for dist in pip.get_installed_distributions():
    if dist.location.startswith('/usr/local/lib/python'):
        print dist.project_name

@szepeviktor szepeviktor changed the title distinguish between PyPI and Debian python packages Distinguish between PyPI and Debian python packages Sep 1, 2014
@szepeviktor
Copy link
Contributor Author

@qwcode
Copy link
Contributor

qwcode commented Sep 2, 2014

I'm closing this in deference to #1646.
I think the proper way is for pip to write an INSTALLER file, and then look for it.

@qwcode qwcode closed this as completed Sep 2, 2014
@szepeviktor
Copy link
Contributor Author

Thank you!

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 5, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 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
Projects
None yet
Development

No branches or pull requests

2 participants