raspberry-pi - 错误:没有名为“PyQt5.sip”的模块 - 安装 eric6-19.03 时
问题描述
我注意到有关 stackoverflow 的许多类似问题,但没有一个能真正帮助我应对当前的挑战。我一直在尝试在我的 Raspberry Pi 设置上安装 eric6。然后我遇到了以下消息:
Checking dependencies
Python Version: 3.6.8
PyQt5 could not be detected.
Error: No module named 'PyQt5.sip'
Shall 'PyQt5' be installed using pip? (Y/n) Y
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: PyQt5 in /usr/local/lib/python3.6/site-packages (5.12)
Sorry, please install PyQt5.
Error: No module named 'PyQt5.sip'
当我尝试使用 pip 列表查看已安装的内容时(因为我之前已经设法从源代码制作和安装 PyQt5):
Package Version
---------- -------
pip 19.0.3
PyQt5 5.12
setuptools 40.6.2
sip 4.19.14
那么,我该如何克服我目前面临的问题呢?顺便说一句,我在尝试安装 eric6 时使用了以下命令:
python3 install.py
认为您可能需要知道它是否有帮助。
解决方案
Python 3.6 在任何 Raspbian 发行版中都不可用,所以我假设您自己安装了它。您不能安装分发外的 Python 版本并期望分发 Python 包能够正常工作。是的,您已经安装了 PyQt5,但它是为 Python 3.5 构建的 PyQt 版本(我假设您使用的是 Raspbian Stretch)。
有时您可以使用 pip 安装 Python 库,理论上可以为您的 Python 版本安装正确版本的 PyQt,但 PyQt 仅在 PyPI 上为 x86 提供轮子,而不为 Arm 提供轮子,因此 PyQt 不能在 pip 上安装皮。在 Raspberry Pi 上获取 PyQt 的唯一方法是通过 apt,您可以选择 Jessie(旧稳定版 - 使用 Python 3.4)、Stretch(当前稳定版 - 使用 Python 3.5)和 Buster(不稳定/测试版 - 使用 Python 3.7)。如果需要 Python >3.5,最好的办法是尝试升级到 Buster,但请记住它还没有准备好发布。
推荐阅读
- r - 为什么 rbind 在 R 的函数循环中不起作用
- google-cloud-platform - 如何为非工程师成员添加 GCS 存储桶的读取权限?
- java - 当 ManyToOne 与 OneToMany 直通关系表一起使用时,持续不工作
- matlab - 如何在不使用 for 循环的情况下计算图像中像素强度的出现次数?
- jenkins - Jenkins Permission Denied on shell 执行
- ios - 显示名称/描述 - 应用内购买已退回
- sql-server - 根据数据库中保存的经度和纬度显示附近的地方。angular6 + sql服务器
- php - 随机选择记录,与先前选择的记录不同
- kubernetes - io.k8s.api.core.v1.PersistentVolumeClaim 中的未知字段“存储”
- configuration - 是否可以为 bitbucket 管道中的不同更改文件触发不同的任务?