【问题标题】:ERROR: pyzmq has an invalid wheel, multiple .dist-info directories found: libsodium-1.0.17.dist-info, pyzmq-18.1.0.dist-info错误:pyzmq 的轮子无效,找到多个 .dist-info 目录:libsodium-1.0.17.dist-info,pyzmq-18.1.0.dist-info
【发布时间】:2021-12-20 05:03:52
【问题描述】:

我在从 GitHub 克隆项目时遇到问题。当我尝试安装 requirements.txt 文件时出现错误:

错误:pyzmq 有一个无效的轮子,多个 .dist-info 目录 找到:libsodium-1.0.17.dist-info、pyzmq-18.1.0.dist-info

我尝试了以下选项,但没有任何效果。知道如何解决这个问题吗?

pip install --no-cache-dir -r requirements.txt

pip install --no-binary=:all: pyzmq==18.1.0

pip 安装轮子

我也打开了 requirements.txt 文件并删除了这个包,但是其他包没有正确安装!

【问题讨论】:

  • 你解决了这个问题吗? requirements.txt 位于哪个仓库?了解正在安装哪些软件包可能会有所帮助。
  • 不,它还没有修复。回购地址是回购地址是:github.com/ChrisFugl/Intrusing-Detection-System-Attack
  • 您是否尝试询问该存储库的问题跟踪器?
  • 您使用的是什么操作系统和 Python 版本?我尝试使用 Python 3.7 和 3.8 在 Windows 10 上安装要求,但遇到了scipy==1.3.1 的问题(请参阅here)。我没有收到与您相同的错误消息。
  • @raha 如果答案解决了您的问题,请不要忘记在答案左侧点赞和accept it by clicking the green check mark

标签: python github pyzmq


【解决方案1】:

编辑:基于 OP 提到的特定回购的解决方案:

我能够使用以下步骤在 repo 中安装 requirements.txt。在 Windows 10 和 Python 3.7 上测试。

  1. here下载scipy v1.3.1 wheel文件。仅支持 Python 3.5-3.7,因此请选择正确的版本 (cp35-cp37)。还要选择正确的操作系统和 32/64 位版本。
  2. 从 .whl 文件所在的文件夹运行 pip install scipy-1.3.1-cp37-cp37m-win_amd64.whl(例如)。
  3. 在 requirements.txt 中:将 tensorflow==2.0.0b0 更改为 tensorflow==2.0.0
  4. 在 requirements.txt 中:将 torch==1.3.0 更改为 torch==1.9.0
  5. 运行pip install -r requirements.txt

原答案:

我个人在使用tfx==1.3.3 安装tensorflow==2.7.0 时看到了pyzmq has an invalid wheel 错误。根据tfx repo,这些版本不兼容,导致依赖冲突。您可能有两个类似的依赖项在做同样的事情。

我通过 3 种方式解决了这个问题:

  1. 指定兼容版本。就我而言,切换到 tensorflow==2.6.0 有效。
  2. 搜索并删除冗余依赖项。在我的例子中,tensorflow 已经包含在tfx 中。删除它解决了问题(实际上还有另一个错误,但这是题外话)。
  3. pyzmq 的特定版本添加到您的requirements.txt 以强制解决。我使用了latest version (pyzmq==22.3.0),它也解决了这个问题。

为了帮助调试问题,您可以使用pipdeptree 查看 pip 依赖树。看到这个answer

【讨论】:

  • 对于 python 版本 3.8.3 我应该使用哪个辣版本?我正在 Window 64 上工作。
猜你喜欢
  • 2021-03-19
  • 2018-04-21
  • 1970-01-01
  • 2021-09-16
  • 2018-11-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-04-21
相关资源
最近更新 更多