将 matplotlib 和 numpy 添加到 flatpak gnome-builder 项目

Add matplotlib and numpy to flatpak gnome-builder project

我想将 matplotlib 和 numpy 添加到我的 gnome-builder 项目中并遵循解决方案(Using Gnome Builder with Python)。但是当我 运行 它输出如下错误:

WARNING: Discarding file:///run/build/python3-matplotlib/matplotlib-3.5.1.tar.gz. Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement matplotlib (from versions: 3.5.1)
ERROR: No matching distribution found for matplotlib
Error: module python3-matplotlib: Child process exited with code 1

谁能帮我解决一下?

我认为最好的解决方案是使用这个 repo https://github.com/flatpak/flatpak-builder-tools

中的 pip 助手

它不仅添加了请求的库,还添加了它的所有依赖项。阅读该 pip 工具的 repo 中的自述文件。你会得到一个 json 文件,之后你可以简单地将其包含到你的 flatpak 清单中(无需复制和粘贴)。只需复制清单旁边的 json 结果并将文件名作为字符串添加到模块部分