【问题标题】:pip install: trying to install multiple version of same package from private pypipip install:尝试从私有 pypi 安装同一软件包的多个版本
【发布时间】:2021-06-18 02:12:39
【问题描述】:

我有一个私人 pypi,并不断将新包 framework 上传到该注册表。

我想在 virtualenv 中安装最新的包。

使用的命令:

pip install -i https://user:pass@registry framework

输出:

Collecting framework:
   ... downloads many versions

ERROR: Cannot install framework==0.25.13, framework==0.25.14 and framework==0.26.0 because these package versions have conflicting dependencies.

The conflict is caused by:
    framework 0.26.0 depends on toolz<0.12.0 and >=0.11.1
    framework 0.25.14 depends on toolz<0.12.0 and >=0.11.1
    framework 0.25.13 depends on toolz<0.12.0 and >=0.11.1

To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict

ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies

我只想下载最新版本。我不能在 pip install 时硬编码像framework==0.26.0 这样的版本,因为这个命令要在脚本中使用,每次上传新的framework 时我可能需要修改脚本。

pip 版本:pip 21.1.2

【问题讨论】:

  • 你可以使用conda环境或者pipenv来解决这个问题。
  • 您尝试安装的软件包依赖项不正确。
  • 您能详细说明您的 cmets 吗?谢谢
  • 您正试图同时安装同一个软件包的多个版本。

标签: python python-3.x pip


【解决方案1】:

解决此问题的解决方案是使用--extra-index-url 而不是-i

使用命令

pip install --extra-index-url https://user:pass@registry framework

【讨论】:

    猜你喜欢
    • 2017-10-31
    • 1970-01-01
    • 2018-12-29
    • 2020-12-26
    • 1970-01-01
    • 2016-06-30
    • 2020-07-29
    • 2021-09-14
    • 2018-07-27
    相关资源
    最近更新 更多