Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 Best method: Python script called from another app, package as complete executable

I am pretty new to Python. I've messed around over the years. I have never packaged or froze a program.

My current project requires me to run a Python script. This python script may have references to other libraries (matplotlib, etc).

But here is where it gets tricky. These are the requirements:
  • Must be able to call script and pass in a couple arguments, like a string
  • The script must be able to be STANDALONE and run on any single Windows computer without need for any installation of other software besides Python.

What is the best way to achieve this and what tools might I look at to do this?

I am complete noob here and don't know where to begin. Thank you
you can cet part of what you need here:
Does the user need to know Python and how to install a package with pip?
If the answer is yes, then the distribution over pip is ok.

If the user has no knowledge, it's better to deploy on Windows a executable with all dependencies.
There are different ways. Currently the lowest hanging fruit comes from PyInstaller. This
packs the Python Interpreter together with the dependencies and the source code in one executable if needed.
Nuitka is different. This module converts Python to C++ and compiles it. There is still an interpreter, but as far
as I know with optimizations from nuitka. This also able to create exe files for Windows.

Another approach is pynsist, which uses the NSIS installer to install the Python Interpreter together with the pip dependencies + provided local wheels all in a installer. It can also be uninstalled.

I don't like it to provide binary files, but sometimes the requirement enforces this.
My code examples are always for Python >=3.6.0
Almost dead, but too lazy to die:
All humans together. We don't need politicians!

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  How do you add the results together each time a function is called? Exsul 10 453 Aug-09-2019, 09:18 PM
Last Post: ichabod801
  Called Functions Not Working WhatAmIDoing09 3 176 Jul-12-2019, 07:02 PM
Last Post: ichabod801
  Package python script which has different libraries as a single executable or script tej7gandhi 1 253 May-11-2019, 08:12 PM
Last Post: keames
  can't install package web in version python 3.7 a21250450 1 304 Mar-29-2019, 11:28 AM
Last Post: Larz60+
  Help with understanding a python package pyhill00 4 350 Mar-21-2019, 12:42 AM
Last Post: Larz60+
  Getting error when called through instance method aankrose 2 327 Mar-02-2019, 07:19 PM
Last Post: aankrose
  new python package test ramkrishna 0 206 Feb-25-2019, 12:18 PM
Last Post: ramkrishna
  Compiling a Python Package on Windows nagymusic 2 615 Jan-29-2019, 12:08 AM
Last Post: nagymusic
  Can someone help me alter/complete my python 3.7 code kathyadventure94 1 501 Nov-22-2018, 04:12 PM
Last Post: ichabod801
  Python for machine learning, complete beginners pythonario 3 1,002 Dec-18-2017, 07:09 AM
Last Post: Terafy

Forum Jump:

Users browsing this thread: 1 Guest(s)