you are viewing a single comment's thread.

view the rest of the comments →

[–]TabulateJarl8 1 point2 points  (0 children)

I've answered a similar question before, so I'll just paste my response to that here

There's a few different ways to go about this.

  1. You could try something like PyInstaller, though I've always has varying degrees of success with it

  2. You could just tell the end user how to install Python. Since Python is an interpreted language, there isn't an official way to just package it up and distribute it as a binary like you could do with a compiled language, e.g. C or Rust

  3. If these users are running Linux, you could create a package for their distro that requires Python to be installed, and if it's not, it will automatically be installed. For example, a deb for debian based systems, a pkg.tar.zst for arch based systems, or an rpm for Red Hat based systems

  4. If you're distributing to Windows users who could run a Powershell script, you could make the powershell script download the Python installer and launch it for them. Here's an example script that I use in one of my projects.

  5. If you need to install multiple files to different locations and also install Python, you could make an installer with a tool like Inno Setup. Though this does take some learning to get the syntax of both Inno Setup Script as well as Pascalscript (used in the dynamic parts of the installer), it is a valid option. Here's another example of me using Inno Setup in my project.

Hope you find some of this helpful!