-
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
script.pip() does not work with use_module=True #7864
Comments
Thanks for filing a new issue for this! My initial response is here: #7810 (comment). Please do follow up on that here. :) |
As you suggested, here #7810 (comment), I have written the test. However, it fails with following stdout
|
Ahhhh. That makes sense -- whoever implemented use_module did not take into account the nuances here. :)
|
Is it this line here https://github.com/pypa/pip/blob/master/tests/lib/__init__.py#L475, where the |
Should be, yea. It might also be in the isolate fixture, so that would be worth taking a look at. |
I found out this is because we don't have pip executable file in the virtual environment's Line 619 in c7bde5b
[...]/src/pip means the absolote path defined in Line 285 in c7bde5b
I'm not sure this is correct. But this can fix the bug. And in Line 294 in c7bde5b
venv.bin (which is the Scripts folder) except those start with "python" or "libpy", what does non-relocatable mean?
|
Environment
Description
While I was working on this #7810, I found that when I use
script.pip("freeze")
withuse_module
asTrue
which is the default behaviour, it does not show any package list, while when I explicitly specifyuse_module
asFalse
, it does.I found that the difference is the way the command is invoked. With
use_module=True
, it is invoked aspython -m pip freeze
and withuse_module=False
, it is invoked aspip freeze
.Expected behavior
Both ways, it should show up the package list.
How to Reproduce
A test can be written to verify this behaviour.
Output
The text was updated successfully, but these errors were encountered: