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.

pip-licenses broken in python 3.11

See original GitHub issue

pip-licenses is broken in python 3.11 for pip>=22.1.

The issue is roughly the same as in #113. Log:

$ pip-licenses
Traceback (most recent call last):
  File "/builds/gitlab/.../.venv/bin/pip-licenses", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/builds/gitlab/.../stubs/.venv/lib/python3.11/site-packages/piplicenses.py", line 900, in main
    output_string = create_output_string(args)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builds/gitlab/.../stubs/.venv/lib/python3.11/site-packages/piplicenses.py", line 558, in create_output_string
    table = create_licenses_table(args, output_fields)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/builds/gitlab/.../stubs/.venv/lib/python3.11/site-packages/piplicenses.py", line 303, in create_licenses_table
    for pkg in get_packages(args):
  File "/builds/gitlab/.../stubs/.venv/lib/python3.11/site-packages/piplicenses.py", line 2[54](...), in get_packages
    pkg_name = pkg.project_name
               ^^^^^^^^^^^^^^^^
AttributeError: 'PathDistribution' object has no attribute 'project_name'

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
nejchcommented, Oct 27, 2022

@raimon49 I just opened this issue and your comment popped up a few seconds after 😃

I installed the rc1 and this works for me on 3.11.

0reactions
raimon49commented, Nov 6, 2022

pip-licenses 4.0.0 has been officially released. Thank you all for your contributions. https://pypi.org/project/pip-licenses/4.0.0/

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's New In Python 3.11 — Python 3.11.1 documentation
Support broke sometime between Python 3.2 and 3.6, with no one noticing until after Python 3.10.0 was released. In addition, bringing back support...
Read more >
[BUG] setuptools doesn't build with Python 3.11.0a7 / upgrade ...
Since Python 3.11.0a7 this module is deprecated and setuptools build fails with DeprecationWarning. This was already fixed in pyparsing ...
Read more >
Can't run pip on python 3.11 - Stack Overflow
I installed Python3.11 from the deadsnakes ppa, it doesn't come with ensurepip or pip, and the bootstrap script initially fails as it ...
Read more >
When should you upgrade to Python 3.11?
When I tried to install it on Python 3.11 on the day of 3.11's release, things don't go well: $ python3.11 -m pip...
Read more >
pip-licenses - Wheelodex
METADATA ; Classifier: Programming Language :: Python :: 3.11 ; Classifier: Topic :: System :: Systems Administration ; Classifier: Topic :: System ...
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