Python Forum
Installing Pillow from remote archive in Linux Flatpak
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing Pillow from remote archive in Linux Flatpak
#1
I've got a Flatpak which uses Python and Pillow (among other things). The installation of Pillow (was written for me, had contradictions and probably wasn't right but) worked until I had to update the Pillow version, then Pillow installation failed. It works if I use a local tarball, but that's no good for releasing it on GitHub. It fails when I try using the remote tarball.

This local version works:

modules:
  - name: python3-pillow
    buildsystem: simple
    build-commands:
      - pip3 install --no-index --find-links="file://${PWD}" --prefix=${FLATPAK_DEST} Pillow     							
    sources:
      - type: file
        path: /home/chris/git/Pillow-8.3.2.tar.gz
For this remote version I've removed --no-index --find-links="file://${PWD}" as I was told they are for local files, but it still fails:

modules:
  - name: python3-pillow
    buildsystem: simple
    build-commands:
      - pip3 install --prefix=${FLATPAK_DEST} Pillow
    sources:
      - type: archive
        url: https://github.com/python-pillow/Pillow/archive/refs/tags/8.3.2.tar.gz
        sha256: 8252b6b514aed2743abb5b7259b3253d6c4bf86902b9c5acd33fe79d24ec7b2f
I'd appreciate some help with the PIP commands for installing from a remote archive.
Reply
#2
Try with.
build-commands:
  - pip3 install .
Working install remote would be.
pip3 install https://github.com/python-pillow/Pillow/archive/refs/tags/9.2.0.tar.gz
ChrisOfBristol likes this post
Reply
#3
(Sep-22-2022, 10:18 PM)snippsat Wrote: Try with.
build-commands:
  - pip3 install .
Working install remote would be.
pip3 install https://github.com/python-pillow/Pillow/archive/refs/tags/9.2.0.tar.gz
So I now have:
modules:
  - name: python3-pillow
    buildsystem: simple
    build-commands:
      - pip3 install .
      - pip3 install https://github.com/python-pillow/Pillow/archive/refs/tags/9.2.0.tar.gz
It errors with:
========================================================================
Building module python3-pillow in /home/chris/.flatpak-builder/build/python3-pillow-9
========================================================================
Running: pip3 install .
Defaulting to user installation because normal site-packages is not writeable
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
WARNING: There was an error checking the latest version of pip.
Error: module python3-pillow: Child process exited with code 1
END ================================================================================================
Reply
#4
The same as you had before the pip install was just demo how it work outside of flatpack.
name: python3-pillow
buildsystem: simple
build-commands:
  - pip3 install .
sources:
  - type: archive
   url: https://github.com/python-pillow/Pillow/archive/refs/tags/9.2.0.tar.gz
   sha256: <hash for file over>
ChrisOfBristol likes this post
Reply
#5
This worked on my PC, but to make the Flatpak work I had put this parameter back "--prefix=${FLATPAK_DEST}" presumably to ensure that it is installed in the correct Flatpak directory.

modules:
  - name: python3-pillow
    buildsystem: simple
    build-commands:
      - pip3 install . --prefix=${FLATPAK_DEST}
    sources:
      - type: archive
        url: https://github.com/python-pillow/Pillow/archive/refs/tags/8.3.2.tar.gz
        sha256: 8252b6b514aed2743abb5b7259b3253d6c4bf86902b9c5acd33fe79d24ec7b2f
Can I ignore this warning?
Successfully installed Pillow-8.3.2
  WARNING: There was an error checking the latest version of pip.
Reply
#6
(Sep-23-2022, 05:48 PM)ChrisOfBristol Wrote: Can I ignore this warning?
Yes,but can also try to upgrade pip(before).
pip3 install --upgrade pip
In flatpack can try this,also mention that i don't use flatpack i just took a quick look at doc.
build-commands:
  - pip3 install --upgrade pip
  - pip3 install .
ChrisOfBristol likes this post
Reply
#7
(Sep-23-2022, 06:05 PM)snippsat Wrote: - pip3 install --upgrade pip
That doesn't work, because it's more complicated for a Flatpak I suppose. I'm not going to worry about it. Thanks for your relevant, expert and unpatronising help.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Extracting specific file from an archive tester_V 4 497 Jan-29-2024, 06:41 PM
Last Post: tester_V
  Find specific file in an archive tester_V 8 3,449 Feb-13-2021, 06:13 PM
Last Post: tester_V
  Questions about installing Pillow Coggleton 1 2,307 Jan-03-2021, 12:01 AM
Last Post: snippsat
  Problem creating an archive trojantrojan 3 2,101 May-10-2020, 01:32 AM
Last Post: trojantrojan
  Invalid archive error when attempting to install dash bootstrap components meaydemi 0 4,764 Jul-11-2019, 05:49 PM
Last Post: meaydemi
  Create file archive that contains crypto hash ED209 1 2,043 May-29-2019, 03:05 AM
Last Post: heiner55
  Archive (.7z, .zip, .rar, .tar, etc) Password Extractor btforensics 1 5,702 Jul-08-2018, 08:29 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020