pkg_resources.DistributionNotFound:未找到“pipenv==2018.10.13"分发版,应用程序需要此分发版 [英] pkg_resources.DistributionNotFound: The 'pipenv==2018.10.13' distribution was not found and is required by the application
问题描述
由于 ansible 的一些损坏的包,我重新安装了 pip 和 pipenv.现在,似乎我的 pip 依赖项都搞砸了.非常感谢任何建议或帮助.
I've reinstalled pip and pipenv due to some broken package with ansible. Now, it seems like my pip dependencies are all screwed. Any suggestion or help is greatly appreciated.
$ which python2
/usr/local/bin/python2
$ which python3
/usr/local/bin/python3
$ which pipenv
/usr/local/bin/pipenv
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/2018.10.13/libexec/bin/pipenv", line 6, in <module>
from pkg_resources import load_entry_point
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3123, in <module>
@_call_aside
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3107, in _call_aside
f(*args, **kwargs)
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3136, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 580, in _build_master
return cls._build_from_requirements(__requires__)
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 593, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/usr/local/Cellar/python/3.7.1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pkg_resources/__init__.py", line 781, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pipenv==2018.10.13' distribution was not found and is required by the application
推荐答案
我遇到了同样的问题.您应该使用您第一次使用的相同包管理器重新安装 pipenv
.
I had the same problem. You should reinstall pipenv
using the same package manager you used the first time.
如果安装是使用
pip
完成的,则:
pip uninstall pipenv
pip install pipenv
如果您使用的是 brew
,那么您必须运行 Andrei 公开的命令一个>
If you are using brew
, then you must run the commands exposed by Andrei
brew uninstall pipenv
brew install pipenv
要检查 pipenv
安装是否成功完成,请运行:pipenv --version
To check if pipenv
installation was successfully completed, run:
pipenv --version
brew reinstall pipenv
这篇关于pkg_resources.DistributionNotFound:未找到“pipenv==2018.10.13"分发版,应用程序需要此分发版的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!