1

i'm newbie for python programming, i'm having a .py file, now what shall i do so i can create an application from .py file and it can be istall and run in any linux pc, i try to packaging it but its just create .tar file where i need python to run it, is it any to do so,

thanks

1

3 Answers 3

2

Make sure that the main python file has #! /usr/bin/env python as the first line, then make sure it has execute permission set (should be as easy as chmod +x file_name.py).

Sign up to request clarification or add additional context in comments.

Comments

1

From link:

"PyInstaller is a program that converts (packages) Python programs into stand-alone executables, under Windows, Linux, and Mac OS X. Its main advantages over similar tools are that PyInstaller works with any version of Python since 1.5, it builds smaller executables thanks to transparent compression, it is fully multi-platform, and use the OS support to load the dynamic libraries, thus ensuring full compatibility."

I have not used it never in linux so I can not give you more info

Comments

0

I think any modern Linux OS has Python installed, so you can just ditribute the .py file if it has no weird dependencies.

1 Comment

yes its true, but i want to make it as an application, so i can add into startup application and always run when user login, no need to run manually by typing python file_name.py

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.