invl/pip-autoremove

Pip 10 error

tybrs opened this issue ยท 4 comments

tybrs commented

When I upgrade to pip version 10. I get the following error if i try to pip-autoremove package -y.

AttributeError: module 'pip' has no attribute 'main'

same issue here:

my output log:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.6/bin/pip-autoremove", line 11, in <module>
    sys.exit(main())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip_autoremove.py", line 109, in main
    autoremove(args, yes=opts.yes)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip_autoremove.py", line 24, in autoremove
    remove_dist(d)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pip_autoremove.py", line 83, in remove_dist
    pip.main(['uninstall', '-y', dist.project_name])
AttributeError: module 'pip' has no attribute 'main'
tybrs commented

Workaround:

$ pip install pip==9.0.3
$ pip-autoremove package
$ pip install --upgrade pip

This is fixed by #15

invl commented

Fixed in v0.9.1