Skip to content

Does not work on pip 10 #8

Description

@singularitti

When I am trying to type yip <some package>, it returns me some messages

 |----------------------------------------------------------------------------------------------------| 0.0% Traceback (most recent call last):
  File "/usr/local/bin/yip", line 434, in <module>
    installed_packages = get_installed()
  File "/usr/local/bin/yip", line 152, in get_installed
    return {i.key: i.version for i in pip.get_installed_distributions()}
AttributeError: module 'pip' has no attribute 'get_installed_distributions'

It seems that it does not work on pip 10 and above. It could probably be solved by from pip._internal.utils.misc import get_installed_distributions instead of pip.get_installed_distributions directly.
My pip version:

$ pip3 -V
pip 10.0.1 from /usr/local/lib/python3.6/site-packages/pip (python 3.6)

Reference

  1. Missing " get_installed_distributions() " attribute in module " pip " pypa/pip#5243

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