10 votes

Is it possible (or normal) to release a Desktop GUI app using PIP/PyPI instead of regular tools like PyInstaller?

Folks,

Firstly, thank you for guiding me with remarkable insights to my queries about Desktop GUI development using PySide in my earlier post.

After much thinking, pondering and meditation, I've made up my mind with using PySide2 for this side project.

Since my app is cross-platform and geared towards power users (who must be having python installed in all likelihood), I want to know if it's feasible to release it through PyPI (PIP) instead of bundling a setup or MSI? Or is this going to be a bit odd?

Are there any such apps already that do this?

12 comments

  1. [10]
    fxgn
    Link
    From a developer point of view? Yes, it's totally possible. But as a user? Pip is the worst package manager I've ever used. I despise installing stuff with pip. I hate using it for cli apps, but...

    From a developer point of view? Yes, it's totally possible. But as a user? Pip is the worst package manager I've ever used. I despise installing stuff with pip. I hate using it for cli apps, but if a gui app was only installable through pip, I probably just wouldn't use it.

    I'd suggest just distributing your app through proper channels (Homebrew on macOS, Flathub on Linux). Homebrew just needs a simple Ruby script and Flatpak packages are a yaml manifest that gets automatically built by their CI/CD.

    Afaik there's no proper package management on Windows, so you can probably use pip as the main installation method there. Or just use one of those GitHub actions to automatically built an msi installer for every new version.

    12 votes
    1. [5]
      pyeri
      Link Parent
      From developer's perspective, tools like PIP are quite convenient though. With bundling and packaging for each platform, you have to sometimes go through all the rabbit holes of OS eccentricities...

      From developer's perspective, tools like PIP are quite convenient though. With bundling and packaging for each platform, you have to sometimes go through all the rabbit holes of OS eccentricities yourself which can get very time consuming very soon!

      But GitHub actions seems to be a very nice feature. You just tag a commit and it automatically fetches the repo files and builds using PyInstaller? That's a really cool feature, I will look more into this.

      4 votes
      1. fxgn
        Link Parent
        Packaging a Python app as a Flatpak is literally just a single pip install and a source url: https://docs.flatpak.org/en/latest/python.html

        With bundling and packaging for each platform, you have to sometimes go through all the rabbit holes of OS eccentricities yourself which can get very time consuming very soon!

        Packaging a Python app as a Flatpak is literally just a single pip install and a source url:

        https://docs.flatpak.org/en/latest/python.html

        2 votes
      2. [3]
        vord
        Link Parent
        I install python packages all the time if my distro doesn't package them, using pipx. It solves the problems of installing python apps in the system nicely without requiring the full complexity of...

        I install python packages all the time if my distro doesn't package them, using pipx. It solves the problems of installing python apps in the system nicely without requiring the full complexity of Flatpak/AppImage/etc.

        1 vote
        1. [2]
          pyeri
          Link Parent
          Besides, Flatpak, AppImage, etc. are Linux only, what if you want to publish to other platforms like MacOS and Windows and ensure its compatibility on various processing architectures and versions...

          Besides, Flatpak, AppImage, etc. are Linux only, what if you want to publish to other platforms like MacOS and Windows and ensure its compatibility on various processing architectures and versions of those platforms? I think the seamless way here is to simply use the PIP/PyPI. You can also take the more drastic approach of bundling using pyinstaller/cx_freeze but I think the work-reward ratio is quite less in that, especially if you're targeting power users who already must be having python and pip installed.

          But as someone here said, this Github Actions thing is worth looking into. If it can make the whole process as seamless as churning out a MSI/ZIP using PyInstaller when you push tags/commits to your repo, I think it's worth it.

          3 votes
          1. vord
            Link Parent
            I wrote a python gui app awhile back, and cx-freeze was great for packaging the MSI. For me, the target audience was windows only and mostly didn't have python, so having it contained was a...

            I wrote a python gui app awhile back, and cx-freeze was great for packaging the MSI. For me, the target audience was windows only and mostly didn't have python, so having it contained was a no-brainer.

            2 votes
    2. paradoxfox
      Link Parent
      There is a package manager for Windows: chocolatey

      There is a package manager for Windows: chocolatey

      3 votes
    3. [2]
      pete_the_paper_boat
      Link Parent
      On Linux my favorite method would have to be AppImage, but it has quirks on NixOS :P

      On Linux my favorite method would have to be AppImage, but it has quirks on NixOS :P

      1 vote
      1. fxgn
        Link Parent
        AppImages are nice, but I prefer to install apps rather than using portable launchers, and I also like to have control over what apps are allowed to do and what files they can access. There has...

        AppImages are nice, but I prefer to install apps rather than using portable launchers, and I also like to have control over what apps are allowed to do and what files they can access. There has also been a few cases of AppImages breaking on specific distros due to missing dependencies, whereas Flatpaks use shared runtimes, so if your package works on one distro, it'll work on all of them

        2 votes
    4. Akir
      Link Parent
      I fully agree. Both Python and Ruby are like this, and I'd bet it's also true for a number of other languages with simelar package managers. When I need a tool that says to just install via...

      I fully agree. Both Python and Ruby are like this, and I'd bet it's also true for a number of other languages with simelar package managers. When I need a tool that says to just install via package manager X, it actually means install a third party utility Y that installs a specific version of language Z in a virtual environment which you will have to access by some utility-specific command, and then you will have to use an arcane OS-specific command to make the utility available outside of the virtual environment.

      (To be fair to Python, though, I've only had one program that required some of these steps.)

      If I'm a developer and this is a tool designed to help development, I probably already did most or all of those other steps. But even if I am a developer in that ecosystem and am simply not working in that context it's a lot of extra steps that I wouldn't do if I didn't need to. Non-developers will probably nope out at "just install with pip!"

      1 vote
  2. unkz
    Link
    Tons of pip packages come with command line tools, seems quite normal to me.

    Tons of pip packages come with command line tools, seems quite normal to me.

    9 votes
  3. knocklessmonster
    Link
    The ERIC IDE does this. You can get conventional installers, but it's so simple to just roll an env and install it. It's also a solid IDE.

    The ERIC IDE does this. You can get conventional installers, but it's so simple to just roll an env and install it. It's also a solid IDE.

    4 votes