Skip to content

pip freeze raises AssertionError in MacOSX #9153

@The-Judge

Description

@The-Judge

Environment

  • pip version: 20.2.4
  • Python version: 3.7.4
  • OS: MacOSX 11.0.1

Description
Similar to #8996, I am receiving an AssertionError when issuing pip freeze; but since I am on pip v20.2.4, which should contain the fix for #8996, I am raising a new bug report.
Other than in #8996, this seems to not even require to be executed with some venv or flit involved.

Expected behavior
pip freeze shouldn't raise an AssertionError but show the list of installed modules and versions.

How to Reproduce
Just execute pip freeze in the mentioned OS and versions.

Output

~ $ python3.7 -m pip -V
pip 20.2.4 from /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip (python 3.7)
~ $ python3.7 -m pip freeze
ERROR: Exception:
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 228, in _main
    status = self.run(options, args)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/commands/freeze.py", line 101, in run
    for line in freeze(**freeze_kwargs):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/freeze.py", line 67, in freeze
    req = FrozenRequirement.from_dist(dist)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/operations/freeze.py", line 258, in from_dist
    direct_url, dist.project_name
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pip/_internal/utils/direct_url_helpers.py", line 49, in direct_url_as_pep440_direct_reference
    assert not direct_url.info.editable
AssertionError
~ $ 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions