question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why are useful command line options in pip undocumented and explicitly hidden?

See original GitHub issue

I use export PIP_REQUIRE_VIRTUALENV=true; in my .bashrc to ensure that I do not accidentally pollute my global env while installing packages for the various projects I work on.

I vaguely remembered that this was the same as adding a --require-virtualenv to the command line while invoking pip.

However, I was unable to find any documentation for this anywhere except in the source code, where help for the feature is explicitly suppressed (using SUPRESS_HELP)! There are 11 such options for which the help has also been explicitly disabled (e.g. --no-input).

I look through the history of the file, but did not find any mention of why the feature was hidden in the commit messages.

Is this an experimental feature which should not be relied upon? Should I not use (nor encourage others to use) these features or is there a different way of using these features? Could someone please shine some light on this conundrum?


This is a question which I had previously posted on StackOverflow hoping that there was an explanation along the lines that these options were only to be used if pip was invoked from other dependency management software.

However, that doesn’t seem to be case, or at least it isn’t common knowledge.

Issue Analytics

  • State:open
  • Created 9 years ago
  • Reactions:4
  • Comments:11 (9 by maintainers)

github_iconTop GitHub Comments

3reactions
chrahuntcommented, Nov 10, 2019

To be specific, in the current version of pip these are the hidden options:

Name Location Note
--require-virtualenv link added in 301dc31, no explanation
--no-input link added in 4d33521, no explanation
--skip-requirements-regex link added in 5aa4be, no explanation - deprecated in #7297
--no-use-pep517 link this was done in #5743 here probably just to remove any redundancy with --use-pep517
--always-unzip link Commented with “Deprecated, remove later”, looks like it is a no-op
install --no-user link #5116 indicates it needed more thought before exposing
0reactions
deveshkscommented, Jun 19, 2020

I have created issue #8408 to get rid of --always-unzip from pip source. If this is something we are looking to do, I can go ahead and create a PR for it.

https://github.com/pypa/pip/pull/8470 is created for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why are useful command line options in pip undocumented ...
1. As far as I can see, that option has always been hidden, right from being in __init__.py through baseparser.py to cmdoptions.py -...
Read more >
User Guide - pip documentation v22.3.1
pip can be configured to connect through a proxy server in various ways: using the --proxy command-line option to specify a proxy in...
Read more >
User Guide - pip documentation v21.1.dev0
pip allows you to set all command line option defaults in a standard ini style config file. The names and locations of the...
Read more >
pdb — The Python Debugger — Python 3.11.1 documentation
It supports setting (conditional) breakpoints and single stepping at the source line level, inspection of stack frames, source code listing, and evaluation of ......
Read more >
The GNU Awk User's Guide
This works nicely, but you should comment clearly what the escape sequences mean. A fourth option is to use command-line variable assignment, like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found