简体   繁体   中英

How do I run a Python 3.5 program that uses Tkinter on a computer without Python installed?

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.

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!

You can use pyinstaller to do that. I think its work fine on linux em linux.

Another option is use py2exe.

尝试使用pyinstaller -F -w Finder.py作为命令,或者可以签出CxFreeze。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM