On Windows, I can convert my python code to exe file using pyinstaller. And by running the resulting exe file, I can get the same output as in the normal code. In order to do the same on Ubuntu, I created the file with pyinstaller on Ubuntu again. But I couldn't find how to run this resulting file. Can you help with this?
For example:
After using pyinstaller on Windows, the file was created as:
example.py → example.exe
After using pyinstaller on Ubuntu, the file was created as:
example.py → example
But here I could not run the example file in any way.
CodePudding user response:
In your terminal
cd
into the directory containing the executable. It should be in adist/
folder.Then run
./example
If that doesn't work it just means that the execution bit isn't set on the file.chmod x ./example
./example