Problems with Pyinstaller with tkinter app on python 3.5

前端 未结 2 524
予麋鹿
予麋鹿 2020-12-30 13:47

Just getting started with Pyinstaller (and somewhat with Tk windowing) and having trouble getting my tkinter windows app (under python 3.5) running successfully. I may be do

相关标签:
2条回答
  • 2020-12-30 13:57

    I faced the same issue and was stuck for 6 hours hunting for the right answer. Now its working for me after I did the following steps:

    1. Uninstall all the Python interpreters.
    2. Download Python-2.7.16.amd64 version (for 64-bit OS) or Python-2.7.16 version(for 32-bit OS).
    3. Go to This PC -> Advanced system Settings -> Environmental Variables
    4. Select Path and click Edit
    5. Add the following paths: a. C:\Python27\Scripts\ b. C:\Python27\
    6. Open cmd
    7. Type "pip install pyinstaller"
    8. After pyinstaller is installed, navigate to the folder where your program is (i.e in tkinter GUI)

    9. In cmd, type:

      pyinstaller program.py

    That will fix your problems.

    The solution I was found was uninstalling all the Python Interpreters and installing 2.7 version.

    P.S. New to stackoverflow

    0 讨论(0)
  • 2020-12-30 14:21

    I was having a similar issues with tkinter and python 3.5 after looking over https://pythonhosted.org/PyInstaller/hooks.html#understanding-pyinstaller-hooks

    add the option of --hidden-import tkinter

    pyinstaller --onefile --hidden-import tkinter hello.py

    0 讨论(0)
提交回复
热议问题