phildini / thanks

Finding ways to fund the packages you use.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

pip 10 support (`module 'pip' has no attribute 'get_installed_distributions')

eblume opened this issue · comments

  • Thanks version: 0.0.7
  • Python version: 3.6.2
  • Operating System: Linux ... 4.10.0-38-generic #42~16.04.1-Ubuntu SMP Tue Oct 10 16:32:20 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

Possibly Helpful: pypa/pip#5243

What I Did

└> thanks Pipfile
Loading data about contributors...
Traceback (most recent call last):
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/bin/thanks", line 11, in <module>
    sys.exit(main())
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/cli.py", line 14, in main
    Thanks(debug=debug).find_package_roles(requirements)
  File "/home/erich/.local/share/virtualenvs/hermes-1m2DSN2C/lib/python3.6/site-packages/thanks/thanks.py", line 29, in __init__
    for package in pip.get_installed_distributions():
AttributeError: module 'pip' has no attribute 'get_installed_distributions'
commented

@eblume the error above should have been redressed br #13 which will become available in the next release.

Tom

For pip 10 use from pip._internal.utils.misc import get_installed_distributions