1

I tried to import matplotlib module to my flatpak project by generating modules by flatpak-pip-generator but I got this error when running:

Running: pip3 install --verbose --exists-action=i --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} "matplotlib" --no-build-isolation
Using pip 21.2.4 from /usr/lib/python3.9/site-packages/pip (python 3.9)
Looking in links: file:///run/build/python3-matplotlib
Processing ./matplotlib-3.5.1.tar.gz
    Running command python setup.py egg_info
    WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb7facd0550>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-scm-git-archive/
    WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb7facd02e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-scm-git-archive/
    WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb7facd0e20>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-scm-git-archive/
    WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb7facd0fd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-scm-git-archive/
    WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7fb7fac771c0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /simple/setuptools-scm-git-archive/
    ERROR: Could not find a version that satisfies the requirement setuptools_scm_git_archive (from versions: none)
    ERROR: No matching distribution found for setuptools_scm_git_archive
    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python3', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmpidcqwaj6', '--quiet', 'setuptools_scm_git_archive']' returned non-zero exit status 1.

    Edit mplsetup.cfg to change the build options; suppress output with --quiet.

    BUILDING MATPLOTLIB
          python: yes [3.9.7 (default, Nov 10 2011, 15:00:00)  [GCC 11.2.0]]
        platform: yes [linux]
           tests: no  [skipping due to configuration]
          macosx: no  [Mac OS-X only]

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

I dont know why error here is:

ERROR: Could not find a version that satisfies the requirement setuptools_scm_git_archive (from versions: none)
ERROR: No matching distribution found for setuptools_scm_git_archive

Here is the details of the modules file.

SOLUTION You can follow this github link to work with previous version of matplotlib.

  • Judging my the entire error message, you Internet connection is not working properly. It says that it couldn't find a "matching distribution", but if you look higher up at the `WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None))...` errors, it seems that it can't connect to the Internet. Try checking your Internet connection. I've gotten errors like this before, and it was because my WiFi was having trouble. – Sylvester Kruin Dec 22 '21 at 20:31
  • Actually, I can't manage to make the latest version of matplotlib (3.5.1) to work with flatpak. But I tried previous version and it works fine. I will edit this question! – Đỗ Quang Huy Dec 23 '21 at 01:55

0 Answers0