I have some python application that should run on customer site. I compile my py
files to pyc
(python byte code).
What is the standard way to run the app on the customer environment? The options I see are:
Application usage: The app is used as a tool to calculate statistics for my main product. The customer won't run it explicitly. It won't have any GUI.
Customer environment will be x64 Windows machine. No other restrictions.
Any recommendations or comments? I couldn't find such discussions on the web.
To deploy, you need to upload this artifact to your production machine. To install it, just run dpkg -i my-package. deb . Your virtualenv will be placed at /usr/share/python/ and any script files defined in your setup.py will be available in the accompanying bin directory.
Python's standard distribution includes IDLE as the default IDE, and you can use it to write, debug, modify, and run your modules and scripts. Other IDEs such as Eclipse-PyDev, PyCharm, Eric, and NetBeans also allow you to run Python scripts from inside the environment.
Given your requirements, the last two options seem most viable:
- Bring python libraries and executable along with my code and run it directly from my installation dir.
- Convert the scripts to exe using some py-to-exe tool.
You can either package your code, or freeze your code and create an executable for the target OS.
Given your requirements, I'd suggest the latter. You can go through the Python Packaging Guide for more details regarding packaging.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With