I'm designing a GUI for my Raspberry Pi 3 B+. I've written the code in Python3.5 and now I want my script to be run as executable (Raspbian package).
Is it possible to do so and if possible any solution is welcomed.
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It only takes a minute to sign up.Sign up to join this community
Your question is ambiguous.
If what you want is to execute the python script at the command line add the shebang at the start of the script and mark it as executable.
#! /usr/bin/env python3
You can rename the script (omit the .py extension if desired).
If you want any user to be able to execute the script you need to put it in a directory on the path e.g.
/usr/local/bin and ensure that all users have execute permission with
sudo chmod +x scriptname
The script will remain a normal python program which can be examined by anyone with read permission.
If you want to convert to a compiled executable this can be done with some tools - this is a general Linux problem, not specific to the Pi.
Making a program executable from the GUI menu requires constructing a suitable LXDE desktop shortcut script.desktop. It is not easy to give generic instructions, but there are plenty of tutorials.