【问题标题】:Custom Python Package Install getting "ERROR: Could not install packages due to an EnvironmentError: Exceeded 30 redirects."自定义 Python 包安装得到“错误:由于 EnvironmentError 无法安装包:超过 30 个重定向。”
【发布时间】:2021-12-29 12:42:18
【问题描述】:

我正在尝试创建一个可用于多个业务项目的私有 python 包。但是,从简单的开始,我关注this tutorial。这看起来很简单,但我遇到了一个错误。我已将示例包代码(工具箱)推送到我的 BitBucket 存储库。然后,在我的 Mac 的命令终端上,我导航到我的 (base) python (miniconda) 环境并尝试像这样安装包:

pip install https://myaccount@bitbucket.org/myteam/toolbox.git

当我这样做时,我收到以下错误:

ERROR: Could not install packages due to an EnvironmentError: Exceeded 30 redirects.

通常,当我从这个 BitBucket 帐户中提取代码时,我需要使用 SSH 密钥或使用密码。这个错误与此有关吗?

无论如何,我怎样才能让这个自定义私有包从 BitBucket 下载/安装而不会出现此错误?

【问题讨论】:

  • pip install git+https://myaccount@bitbucket.org/myteam/toolbox.gitpip.pypa.io/en/stable/topics/vcs-support
  • 博士,你是对的。我只是在命令中省略了git+。谢谢
  • 如果您想使用 SSH,也可以使用 pip install git+ssh://git@bitbucket.org/myteam/toolkit.git

标签: python pip package bitbucket setuptools


【解决方案1】:

此答案是问题下方 cmets 的正式版本。您忘记在pip install 命令中包含git+。如果您想使用 HTTP,请使用如下命令:

pip install git+https://myaccount@bitbucket.org/myteam/toolbox.git

如果您想使用 SSH,请使用类似的命令

pip install git+ssh://git@bitbucket.org/myteam/toolkit.git

请参阅支持文档here

【讨论】:

    猜你喜欢
    • 2021-08-09
    • 2019-02-27
    • 2019-03-27
    • 2019-01-08
    • 1970-01-01
    • 2019-05-21
    • 2020-10-24
    • 1970-01-01
    • 2023-04-03
    相关资源
    最近更新 更多