繁体   English   中英

pip 安装不起作用,找不到分发

[英]pip install not working, Distribution not found

我正在尝试安装 Pip 和 anaconda。

在我的 mac 中,我有 python 2 和 python 3。

当我尝试easy_install pip我收到错误[Errno 13] Permission denied: '/Library/Python/2.7/site-packages/test-easy-install-14341.write-test'

所以我试着做一个pip install

我有

Traceback (most recent call last):
  File "/usr/local/bin/pip", line 6, 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 3241, in <module>
    @_call_aside
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3225, in _call_aside
    f(*args, **kwargs)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources/__init__.py", line 3254, 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 585, 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 598, 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 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pip==19.3.1' distribution was not found and is required by the application

我也无法安装 Anaconda,可能是因为这个问题

附注。 我已经使用自制软件来安装python。

有人解决了吗?

问题之一是,从现在开始,我们将使用pip3而不是pip 另一个问题是open ~/.zshrc文件需要使用来自 anaconda 的相同的open ~/.bash_profile指令进行更新。

综上所述

我认为要安装 pip 包,您需要使用pip3命令,或者您可以编写一个别名文件,将 pip 替换为 pip3。

然后为了实际使用conda我遵循了这篇文章,以便它超出 mac 配置的 zhs。

让 Anaconda 工作

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM