簡體   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