问题
I have coded a program in Python 3.5 that uses the Tkinter import. I'm trying to figure out a way to run it on computers that don't have Python. First I tried freezing it but I haven't been able to because none of the freezing tools I found support Python 3.5. Then I tried possibly using a online idle but I couldn't find any that support Tkinter. I would prefer to be able to get a .exe file or something similar but if I could run it online that would be good too any ideas?
EDIT
So I have now successfully downloaded PyInstaller using pip. My current problem is when I type this into the console: pyinstaller.exe --onefile --windowed Finder.py I get this error: 'pyinstaller.exe' is not recognized as an internal or external command, operable program or batch file.
EDIT I have now found the pathway to pyinstaller.exe. Now when I try to use it it says Access is denied.
回答1:
I finally figured it out after about three days of work. Fist I downloaded PyInstaleller in the zipped form and extracted it. Then I put my program in the PyInstaller folder. Then I opened a regular command prompt. I then typed cd then the location of the PyInstaller folder. Finally I typed pyinstaller.py --one file --windowed program.py. Then when I went into the PyInstaller folder there was a folder called program with the .exe file in the dist folder. Thanks everyone for all of your help!
回答2:
You can use pyinstaller to do that. I think its work fine on linux em linux.
Another option is use py2exe.
回答3:
Try pyinstaller -F -w Finder.py
as the command or you could check out CxFreeze.
来源:https://stackoverflow.com/questions/40325067/how-do-i-run-a-python-3-5-program-that-uses-tkinter-on-a-computer-without-python