Best method: Python script called from another app, package as complete executable - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: General Coding Help (https://python-forum.io/forum-8.html) +--- Thread: Best method: Python script called from another app, package as complete executable (/thread-20000.html) |
Best method: Python script called from another app, package as complete executable - ironfelix717 - Jul-23-2019 Hi, 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:
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 RE: Best method: Python script called from another app, package as complete executable - Larz60+ - Jul-23-2019 you can cet part of what you need here: http://www.discoversdk.com/blog/how-to-create-a-new-python-module RE: Best method: Python script called from another app, package as complete executable - DeaD_EyE - Jul-24-2019 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 . Thispacks 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 faras 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. |