【发布时间】:2019-11-12 16:00:43
【问题描述】:
我最近才重新开始学习有关 django 软件的更多信息。它需要我安装一些软件包,但我发现我的 pip 不起作用。所以我想我必须重新安装它或其他东西,因为这之前工作过所以我尝试了 Sudo apt-get --update 但后来我得到了 apt-get 命令未找到的错误。我在互联网上搜索了这个问题的答案,但我还没有找到有这个问题的答案。
这是 pip 给我的错误。
Traceback (most recent call last):
File "/usr/local/bin/pip", line 5, in <module>
from pkg_resources import load_entry_point
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3095, in <module>
@_call_aside
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3081, in _call_aside
f(*args, **kwargs)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3108, in _initialize_master_working_set
working_set = WorkingSet._build_master()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 660, in _build_master
return cls._build_from_requirements(__requires__)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 673, in _build_from_requirements
dists = ws.resolve(reqs, Environment())
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 846, in resolve
raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==19.0.3' distribution was not found and is required by the application
我已尝试查看是否可以重新安装 sudo 或 pip 但同样的问题。
简单的代码如: apt-get 安装 sudo apt-get 点子
我希望我能得到一个简短的回复,抱怨我没有完成我的行或缺少某些东西,但是 pip 给了我这个奇怪的错误。
【问题讨论】:
-
apt-get是来自 Debian 系列 Linux(Debian、Ubuntu 和其他衍生产品)的命令。它不能在你的 MacOS X 上。