【问题标题】:pip msgpack error while installing requirements安装要求时 pip msgpack 错误
【发布时间】:2020-04-15 11:17:24
【问题描述】:

我使用pip install -r requirements.txt,得到了这个错误:

AttributeError: module 'msgpack' has no attribute 'dumps'

完整日志:https://pastebin.com/aTTwyrML

requirements.txt:https://github.com/poljar/weechat-matrix/blob/master/requirements.txt

这似乎也打破了pip install 的其他用途。

我在任何地方都找不到任何pip 问题或解决方案。

编辑:msgpack 被导入自:'/usr/lib/python3.8/site-packages/msgpack/__init__.py'

其他导致错误的包:

  • pytconf

【问题讨论】:

  • 您的项目中是否有名为msgpack 的文件或文件夹?
  • @FlyingTeller 不,我认为这只是普通的 msgpack(本地和系统)
  • 你能打开一个python解释器然后import msgpack然后msgpack.__file__来检查它是从哪里导入的吗?
  • 看来这个问题已经解决了:github.com/msgpack/msgpack-python/issues/424

标签: python pip msgpack requirements.txt


【解决方案1】:

您正在运行 python 版本 3.8,而 msgpack 仅支持最高 3.7。这可能会导致通过 pip 安装 msgpack 出现问题,或者在 3.8 中存在一些在 3.7 及更低版本中没有的中断实现。我知道在使用 3.8 的团队和使用早期版本的团队之间共享项目时遇到了一些麻烦。

msgpack on pypi.

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-04-19
    • 1970-01-01
    • 1970-01-01
    • 2019-06-21
    • 2012-01-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多