Add name-only option in `pip freeze`
See original GitHub issueWhat’s the problem this feature will solve?
To display all installed package without version details.
Describe the solution you’d like
pip freeze --simple
, then all names of installed packages will be listed without version numbers.
Alternative Solutions
There is a way to use gawk to eliminate version string after ==
, but it is too complicated.
Additional context
Issue Analytics
- State:
- Created 4 years ago
- Comments:11 (8 by maintainers)
Top Results From Across the Web
pip freeze - pip documentation v22.3.1
python -m pip freeze [options] ... This option can be used multiple times. ... Generate a requirements file and then install from it...
Read more >pip freeze creates some weird path instead of the package ...
I am working on developing a python package. I use pip freeze > requirements.txt to add the required package into the requirement.txt file....
Read more >Technical specification: solver state
How this list is built from the prefix state and context options is not a straightforward process, but an elaborate logic. This is...
Read more >pip freeze — pip 10.0.0.dev0 documentation
Output installed packages in requirements format. packages are listed in a case-insensitive sorted order. Options¶. -r ...
Read more >Wing Tips: Helpful Hints for Wing Python IDE
This is almost always the case in modern Python versions, or use <a class="reference" href="https://github.com/pypa/get-pip">getpip.py</a> to install it.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m also -1 on this feature. I would more easily accept this feature as a new
--format name
value forpip list
. But even there, you couldpip list --format json | jq -r .[].name
🤷♂️Hmm… All of that can be covered by
pip freeze | sed 's/==.+$//'
(or equivalent on windows, but given that you’re using$()
syntax, you’re not affected by that). This is especially true since you can make the assumptions about the environment, like that there are no editable installs from a VCS repository – edge cases like this have to be covered by any option we add to pip freeze for example.I’m not convinced that these use cases are common enough to justify adding more complexity to pip.
While this is functionally simple, there’s a line to be drawn somewhere about what amount of knobs/levers we can have on a tool until it gets overwhelming. I don’t think this knob justifies the addition of complexity.