I am a new in python. I am using Python 3.6. I have created a little programm with tkinter, matplotlib and fpdf modules. I am trying to make executable file from code to use on other computers without Python. Please, tell me the best way to do this. I used pyinstaller - not done, cx_Freeze - There is I have got some mistakes. Anyway, I need your help, please, ask me for more information.
1 Answer
There is a module PyInstaller which converts .py file into .exe file. First,go to command prompt and type:
pip install pyinstaller
Now type cd command :
cd Your file.py location
At last,type the pyinstaller command:
pyinstaller --onefile yourfile.py
But,your python must be stored in the folder as it will create some new folders in it. Now,take your .exe file out of dist folder and keep where your python file is there.
That's it!
You have created executable file!
For References,
PS. First check if there is any error and then make exe. I think you have add something which is dependent to your exe.
Take it out of dist folder and keep beside your python file and check.