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

the new issue template should ask how pip was installed #5813

Open
benoit-pierre opened this issue Sep 25, 2018 · 13 comments
Open

the new issue template should ask how pip was installed #5813

benoit-pierre opened this issue Sep 25, 2018 · 13 comments
Labels
state: awaiting PR Feature discussed, PR is needed type: maintenance Related to Development and Maintenance Processes

Comments

@benoit-pierre
Copy link
Member

A number of issues are caused by the use of distribution packaged version of pip:

Maybe add a new How is pip installed? field. Alternatively, maybe the user should be asked to paste to exact output of pip --version (and said output should be amended to at least mention if pip is de-vendored).

@pfmoore
Copy link
Member

pfmoore commented Sep 25, 2018

That sounds like a good idea to me.

Maybe also "can you reproduce this using the standard version of pip?" although that could make things worse, by causing people to try to install "the official version of pip" in away that clashes with the distro installation, or some such :-(

@benoit-pierre
Copy link
Member Author

Yeah, it would be great if there was a version of get-pip.py that is not limited to the install command.

@benoit-pierre
Copy link
Member Author

It's too bad zipimport does not support files with a comment or this would work:

> wget https://github.com/pypa/pip/archive/master.zip
> PYTHONPATH=master.zip/pip-master/src python -m pip --version

;(

@pfmoore
Copy link
Member

pfmoore commented Sep 25, 2018

>py pip-18.0-py2.py3-none-any.whl/pip --version
pip 18.0 from E:\Work\Scratch\pip-18.0-py2.py3-none-any.whl\pip (python 3.7)

There's probably some corner cases where it doesn't work 100% correctly (I think that there are places that need to reference the cert store from certifi from an actual file, not from a zipfile) but it mostly works.

Totally unsupported for any real uses, of course :-)

@pradyunsg
Copy link
Member

pradyunsg commented Sep 26, 2018

Alternatively, maybe the user should be asked to paste to exact output of pip --version (and said output should be amended to at least mention if pip is de-vendored).

👍

I was wondering if there is merit in pushing this even further and ask the user to add post something along the lines of what pipenv does with pipenv --support to the issue.


As an aside, I think we can definitely improve the language in the issue template, to get better issue filings.

@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label Sep 26, 2018
@dstufft
Copy link
Member

dstufft commented Sep 26, 2018

One idea might be a pip debug or something so as not to overload --version, that can print a bunch of relevant debug information.

@pfmoore
Copy link
Member

pfmoore commented Sep 26, 2018

One problem, we get a lot of cases where people are running one version of pip when they think they are running another. It'll be awfully easy to get people even more confused because pip debug doesn't work...

But that minor point aside, I like the idea of a pip debug. Going back to the original question, it could report the file locations where it finds our (supposedly) vendored dependencies, as well as maybe any option overrides in pip.ini, and things like that. I'm not sure how we deal with distro patches - maybe introspect the code for "known patches" and report something like "Debian patches detected"...?

@dstufft
Copy link
Member

dstufft commented Sep 26, 2018

Could do something funky like generate a hash of our installation directory and report that. It won't tell us what has changed, but if someone's hash is wrong, that suggests something changed. Whether that something is relevant or not is another question.

@pradyunsg pradyunsg added type: feature request Request for a new feature and removed S: needs triage Issues/PRs that need to be triaged labels Sep 26, 2018
@pradyunsg
Copy link
Member

I too like the pip debug command too.

@benoit-pierre
Copy link
Member Author

I think it would be better to stick with pip --version, maybe add more info when called with --verbose? This way you don't have a set of instructions that does not apply to old versions.

@pfmoore
Copy link
Member

pfmoore commented Nov 23, 2018

One other thing that would be useful in a pip debug type of command would be the output of pip._internal.pep425tags.get_supported(), to help people diagnose issues where they are getting "No distributions found for this requirement" errors.

Overall, I think that if we added a pip debug command, it wouldn't provide much information that isn't available elsewhere at the moment, so at first glance it doesn't seem particularly worthwhile - but what it would do is provide an obvious place to add further debug information when the need is identified.

@pradyunsg
Copy link
Member

what it would do is provide an obvious place to add further debug information when the need is identified.

Yep! FWIW, if do go the pip debug, we should also note somewhere that pip debug's output is meant to be human readable and not for parsing/automated consumption. If someone wants that information to be exposed, we likely should have some packaging tooling that provides it to them.

@chrahunt chrahunt added the state: awaiting PR Feature discussed, PR is needed label Sep 14, 2019
@pradyunsg pradyunsg added type: maintenance Related to Development and Maintenance Processes and removed type: feature request Request for a new feature labels Sep 14, 2019
@pradyunsg
Copy link
Member

FTR - we have a pip debug command in pip > 19.2 now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state: awaiting PR Feature discussed, PR is needed type: maintenance Related to Development and Maintenance Processes
Projects
None yet
Development

No branches or pull requests

5 participants