pip 18.1: pipenv graph results in ImportError: cannot import name 'get_installed_distributions'
See original GitHub issueIssue description
When you install pip 18.1 (not reproducible with pip 18.0 and below), pipenv graph
fails with ImportError
.
Expected result
I expect pipenv graph
to work with no exceptions.
Actual result
$ pipenv graph
Traceback (most recent call last):
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/pipdeptree.py", line 17, in <module>
from pip._internal import get_installed_distributions
ImportError: cannot import name 'get_installed_distributions'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File ".../.local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File ".../.local/lib/python3.6/site-packages/pipenv/cli.py", line 922, in graph
do_graph(bare=bare, json=json, json_tree=json_tree, reverse=reverse)
File ".../.local/lib/python3.6/site-packages/pipenv/core.py", line 2363, in do_graph
import pipdeptree
File ".../.local/lib/python3.6/site-packages/pipenv/vendor/pipdeptree.py", line 20, in <module>
from pip import get_installed_distributions, FrozenRequirement
ImportError: cannot import name 'get_installed_distributions'
Issue Analytics
- State:
- Created 5 years ago
- Reactions:10
- Comments:10 (5 by maintainers)
Top Results From Across the Web
cannot import name 'project' from 'pipenv.core' - Stack Overflow
I'm trying to run a Python script on Pycharm but when I try to do pipenv install , I get this error cannot...
Read more >pip 18.1: pipenv graph results in ImportError: cannot import ...
pip 18.1 : pipenv graph results in ImportError: cannot import name 'get_installed_distributions',I'mcurrentlyusingpython3 -m pip install ...
Read more >pip 18.1: pipenv graph results in ImportError: cannot ... - 博客园
pip 18.1 : pipenv graph results in ImportError: cannot import name 'get_installed_distributions'. I'm currently using. python3 -m pip install pip ...
Read more >Can't run pipenv dependencies: `ImportError: cannot import ...
Executed command: /usr/local/bin/pipenv graph --json. C detected. Error occurred: ImportError: cannot import name get_installed_distributions.
Read more >pipenv Documentation - Read the Docs
You no longer need to use pip and virtualenv separately. They work together. ... Give you insight into your dependency graph (e.g. $...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is caused py
pipenv
not being compatible to the latest release ofpip
. #2924 is another error cause by the same issue.The workaround that works there is valid for this issue downgrade your
pip
to a version prior to18.1
.I’m currently using
Once #2924 is fixed and released, you can upgrade again to the latest and greatest.
I’m getting a similar issue to @thernstig above. Just updated this morning.
Error below: