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

get_installed_distribution has gone from module pip #5154

Closed
erdnaxeli opened this issue Apr 3, 2018 · 9 comments
Closed

get_installed_distribution has gone from module pip #5154

erdnaxeli opened this issue Apr 3, 2018 · 9 comments
Labels
auto-locked Outdated issues that have been locked by automation

Comments

@erdnaxeli
Copy link

  • Pip version: 10.0.0b2
  • Python version: 3.6.4
  • Operating system: Ubuntu 14.04

Description:

The method get_installed_distribution is not imported in the pip module anymore.

What I've run:

(venv) @:~/bacasable/dist$ pip install pip==9.0.3
Collecting pip==9.0.3
  Downloading pip-9.0.3-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 7.0MB/s 
Installing collected packages: pip
  Found existing installation: pip 10.0.0b2
    Uninstalling pip-10.0.0b2:
      Successfully uninstalled pip-10.0.0b2
Successfully installed pip-9.0.3
(venv) @:~/bacasable/dist$ python -c 'import pip; pip.get_installed_distributions'
(venv) @:~/bacasable/dist$ pip install pip==10.0.0b2
Collecting pip==10.0.0b2
  Using cached pip-10.0.0b2-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 9.0.3
    Uninstalling pip-9.0.3:
      Successfully uninstalled pip-9.0.3
Successfully installed pip-10.0.0b2
(venv) @:~/bacasable/dist$ python -c 'import pip; pip.get_installed_distributions'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: module 'pip' has no attribute 'get_installed_distributions'
@erdnaxeli
Copy link
Author

Same with pip.req:

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

@pfmoore
Copy link
Member

pfmoore commented Apr 3, 2018

Correct. The use of pip as a module was never been supported, and the internal APIs have been reorganised in pip 10. See the announcement from last October for details: https://mail.python.org/pipermail/distutils-sig/2017-October/031642.html

@erdnaxeli
Copy link
Author

Sadness.

@brianherman
Copy link

This breaks zappa.

@jasweet
Copy link

jasweet commented May 13, 2018

This breaks a ton of crap, Napalm included. So very dumb. 👎 Boooooo0!

@adam-arold
Copy link

So how do I work around this? I'm trying to use Databricks operator in Airflow and this blows in my face.

@pradyunsg
Copy link
Member

Change it to use pkg_resources.WorkingSet?

@rustanacexd
Copy link

holy ****

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

No branches or pull requests

7 participants