Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with pip>=10? #1

Closed
bedge opened this issue Jul 10, 2018 · 1 comment
Closed

Not working with pip>=10? #1

bedge opened this issue Jul 10, 2018 · 1 comment

Comments

@bedge
Copy link

bedge commented Jul 10, 2018

using python 2.7:

❯ pip-module-scanner
Traceback (most recent call last):
File "/Users/bedge/Virtualenvs/p2/bin/pip-module-scanner", line 11, in
sys.exit(main())
File "/Users/bedge/Virtualenvs/p2/lib/python2.7/site-packages/pip_module_scanner/main.py", line 18, in main
scanner = Scanner(path=options.path, output=options.out)
File "/Users/bedge/Virtualenvs/p2/lib/python2.7/site-packages/pip_module_scanner/scanner.py", line 21, in init
self.libraries_installed = pip.get_installed_distributions()
AttributeError: 'module' object has no attribute 'get_installed_distributions'

❯ pip --version
pip 10.0.1 from /Users/bedge/Virtualenvs/p2/lib/python2.7/site-packages/pip (python 2.7)

This implies it's pip version >= 10 related: Miserlou/Zappa#1471

FWIW, not working at all with python 3:

❯ pip-module-scanner
Traceback (most recent call last):
File "/Users/bedge/Virtualenvs/p3/bin/pip-module-scanner", line 7, in
from pip_module_scanner.main import main
File "/Users/bedge/Virtualenvs/p3/lib/python3.6/site-packages/pip_module_scanner/init.py", line 2, in
import main
ModuleNotFoundError: No module named 'main'

@Paradoxis
Copy link
Owner

Paradoxis commented Sep 14, 2018

Sorry for the late reply, totally missed your issue in my inbox. Fixed your issue, made it compatible with all versions of python from 2.7 to 3.6 and added unit tests for future stability.

You can update the package with:

$ pip install -U pip-module-scanner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants