【问题标题】:Getting an error when trying to download a Python package on Linux尝试在 Linux 上下载 Python 包时出错
【发布时间】:2021-10-07 18:22:35
【问题描述】:

我想使用 raspberry bi 上的“bleak”包连接到蓝牙低功耗外围设备。 当我使用命令pip install bleak 时出现错误:

Could not find a version that satisfies the requirement dbus-next; platform_system == "Linux" (from bleak) (from versions: ) No matching distribution found for dbus-next; platform_system ++ "Linux" (from bleak)

their website 上声明他们确实支持 Linux 平台。

我尝试在安装它的 Macbook 上下载该软件包,但没有任何问题。

对于该错误消息的确切含义有什么帮助吗?提前谢谢你。

【问题讨论】:

  • 您可能会遇到预编译包不可用/与 Pi 的 ARM 处理器不兼容的问题,该处理器的指令集与 Intel/AMD/etc. 的 x86_64 不同 - 从重新编译pi 本身的来源应该是诀窍

标签: python linux raspberry-pi bluetooth-lowenergy


【解决方案1】:

也许你使用了错误的 pip 版本,试试 pip3 install bleak。如果它不起作用,请使用这些命令的输出编辑您的帖子:

which python
which pip

【讨论】:

    【解决方案2】:

    我也有同样的问题……听从了乔纳森的建议,得到了类似的错误:

    No local packages or working download links found for dbus-next; platform_system == "Linux"
    error: Could not find suitable distrbuiton for Requirement.parse('dbus-next; platform_system == "Linux"')
    

    我按照相同的程序克隆和安装python-dbus-next,这似乎已经解决了这个问题。

    https://github.com/altdesktop/python-dbus-next

    【讨论】:

      【解决方案3】:

      您可以尝试从源安装 (Reference)

      解释给定的链接:

      从 GitHub 克隆:$ git clone git://github.com/hbldh/bleak
      访问 repo:$ cd ~/bleak(假设您在根目录下克隆)
      安装源:$ python setup.py install

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2021-09-11
        • 2017-05-14
        • 2021-12-26
        • 1970-01-01
        • 2016-10-09
        • 1970-01-01
        • 1970-01-01
        • 2019-12-05
        相关资源
        最近更新 更多