androguard fails to find pygments, but it seems to be included

pi@raspbian:~ $ flatpak run org.fdroid.Repomaker 
Traceback (most recent call last):
  File "/app/bin/repomaker", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3250, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3234, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3263, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'pygments>=2.3.1' distribution was not found and is required by androguard

So I tried manually installing pygments in the package. It turns out it was already being downloaded, so I added a manual pip3 install pygments, but it fails: https://gitlab.com/fdroid/fdroid-repomaker-flatpak/-/jobs/858513369

Installing collected packages: Pygments, pydot, colorama, asn1crypto, lxml, decorator, networkx, click, ptyprocess, pexpect, pickleshare, wcwidth, prompt-toolkit, backcall, ipython-genutils, traitlets, parso, jedi, ipython, androguard, args, clint, smmap, gitdb, GitPython, mwclient, pycparser, cffi, bcrypt, pynacl, cryptography, paramiko, Pillow, apache-libcloud, pyasn1, pyasn1-modules, python-vagrant, PyYAML, qrcode, ruamel.yaml.clib, ruamel.yaml, websocket-client, docker-pycreds, docker-py, fdroidserver
  Found existing installation: Pygments 2.3.1
ERROR: Cannot uninstall 'Pygments'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
Error: module fdroidserver-deps: Child process exited with code 1

@Persival any ideas? I asked on #flathub but didn't get far.