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

Switch from Shelling out to Pip to Using the Native Pip Module #4

Closed
Justintime50 opened this issue May 12, 2021 · 0 comments · Fixed by #6
Closed

Switch from Shelling out to Pip to Using the Native Pip Module #4

Justintime50 opened this issue May 12, 2021 · 0 comments · Fixed by #6
Assignees
Labels
enhancement New feature or request

Comments

@Justintime50
Copy link
Owner

Of course, the beauty of using Python for this project means we can access the native Pip module...

from pip._internal.utils.misc import get_installed_distributions

for package in get_installed_distributions:
    print(package)
    print(package.requires)

This will improve the performance of this tool dramatically (#2) and is much safer than shelling out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant