.py to .exe for ubuntu

Hello to everyone,

I want to convert a .py file into an exe file that can be opened with a double click. I tried many methods on the internet but without success. The error I encountered when I did the pyinstaller method;

“Could not display, There is no application installed for “shared library” files. Do you want to search for an application to open this file?”

Thanks in advance.

Create a bash script and add context like “python xxx.py” then make the bash script running by click.