-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Using pip from your program: wrong command #7008
Comments
Why? That would run |
Hey there @Drugong! Thanks for filing this issue. pip has multiple commands (like install) and freeze is one such command. We have a reference list of pip's commands at https://pip.pypa.io/en/latest/reference/. I think your suggestion stems from an understanding that pip does not have a freeze command, but as @pfmoore pointed out, it does. :) |
I think the way it is currently worded one might expect the same command to be used in both examples. We might expand on the text to indicate that we did actually mean to put |
Hi @chrahunt I think we can change the current text which says
to
If that change is something what you meant if your comment above, I can create a PR for the same. |
That sounds like a reasonable clarification to add. |
Thanks @pfmoore for your comment. I have added a PR to add this explanation |
In the documentation, there is a mistake in the subprocess command at the bottom of the page.
https://pip.pypa.io/en/stable/user_guide/#using-pip-from-your-program
The first command is:
subprocess.check_call([sys.executable, '-m', 'pip', 'install', 'my_package'])
which works fine.But the second is:
reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'freeze'])
And should be:
reqs = subprocess.check_output([sys.executable, '-m', 'pip', 'install', 'freeze'])
The text was updated successfully, but these errors were encountered: