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.

Add name-only option in `pip freeze`

See original GitHub issue

What’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:open
  • Created 4 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
xavfernandezcommented, Oct 7, 2019

I’m also -1 on this feature. I would more easily accept this feature as a new --format name value for pip list. But even there, you could pip list --format json | jq -r .[].name 🤷‍♂️

2reactions
pradyunsgcommented, Oct 6, 2019

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.

Read more comments on GitHub >

github_iconTop 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 >

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