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

Does not work with latest pip #41

Open
sk- opened this issue May 16, 2018 · 4 comments
Open

Does not work with latest pip #41

sk- opened this issue May 16, 2018 · 4 comments

Comments

@sk-
Copy link

sk- commented May 16, 2018

PIP moved the apis to the _internal directory in commit 95bcf8c5f6 , so now the command fails with

Traceback (most recent call last):
  File "/Users/user/.virtualenvs/venv/bin/important", line 7, in <module>
    from important.__main__ import check
  File "/Users/user/.virtualenvs/venv/lib/python3.6/site-packages/important/__main__.py", line 12, in <module>
    from important.parse import parse_dir_imports, parse_file_imports, \
  File "/Users/user/.virtualenvs/venv/lib/python3.6/site-packages/important/parse.py", line 20, in <module>
    from pip.commands.show import search_packages_info
ModuleNotFoundError: No module named 'pip.commands'

I changed the imports to

from pip._internal.commands.show import search_packages_info
from pip._internal.req import parse_requirements as pip_parse_requirements
pip._internal.download.PipSession()

and then it works.

@addysunn
Copy link

addysunn commented Jul 3, 2018

Hi sk- which file did you change?

@sk-
Copy link
Author

sk- commented Jul 6, 2018

@addysunn I changed the file https://github.com/cfournie/important/blob/master/important/parse.py

@addysunn
Copy link

addysunn commented Jul 6, 2018

Hi Sebastian thanks for the response

@murphyke
Copy link

murphyke commented Sep 26, 2019

+1 for this. Using latest Python 3.7, I run into this.

There's another reference to pip.download that breaks also; not sure if it's in the PR.

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

3 participants