Home > Software design >  Add matplotlib and numpy to flatpak gnome-builder project
Add matplotlib and numpy to flatpak gnome-builder project

Time:12-17

I want to add matplotlib and numpy to my gnome-builder project and follow the solution(Using Gnome Builder with Python). But when I run it outputs errors like following:

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

Could anyone help me to solve it?

CodePudding user response:

I think the best solution is to use the pip helper from this repo https://github.com/flatpak/flatpak-builder-tools

It adds not only the requested library but also all its dependencies. Read the README in that repo for the pip tool. Your get an json file you can simply include afterwards to your flatpak manifest (no need to copy and paste). Just copy the json result beside the manifest and add the filename as string to the module section

  • Related