如何从python文件生成exe应用程序

如何从python文件生成exe应用程序,python,pyinstaller,tkcalendar,Python,Pyinstaller,Tkcalendar,我正在尝试使用pyinstaller从此脚本获取.exe文件 我在test目录中时使用了这个命令pyinstaller-w-F test.py 文件test.py包含 from tkinter import * from tkcalendar import DateEntry root = Tk() date = DateEntry(root, year=2001, month=11, day=11, width=17,) date.pack() root.mainloop() 我得到的.e

我正在尝试使用pyinstaller从此脚本获取.exe文件

我在test目录中时使用了这个命令pyinstaller-w-F test.py

文件test.py包含

from tkinter import *
from tkcalendar import DateEntry

root = Tk()
date = DateEntry(root, year=2001, month=11, day=11, width=17,)
date.pack()
root.mainloop()
我得到的.exe文件不工作


当我执行此pyinstaller-F test.py时,控制台上没有名为babel.numbers的模块出现错误

pyinstaller似乎无法解析tkcalendar的模块babel.numbers。一个简单的方法是使用:


PyInstaller似乎无法解析tkcalendar的模块babel.number。一个简单的方法是使用:


你试过克苏吗?没有@RahulAgarwalI发现它非常简单,而且比其他软件包更好。有很多答案,所以对于sameI,通常使用cx_-Freeze、py2exe或nuitka;我经常给我添麻烦。有什么原因不能在客户端机器上安装Python吗?@AgihammerTheep有什么原因不能在客户端机器上安装Python是什么意思?有没有尝试过cx\U?没有@RahulAgarwalI发现它非常简单,而且比其他软件包更好。有很多答案,所以对于sameI,通常使用cx_-Freeze、py2exe或nuitka;我经常给我添麻烦。无法在客户端机器上安装Python的任何原因?@AgiHammerTheep无法在客户端机器上安装Python的任何原因是什么意思?请使用install Pyinstaller和tkcalendar。另外,在第一行放一个print语句,确保在控制台输出中看到它,记住**不要使用-w flag.thanx它在没有虚拟环境的情况下工作使用install Pyinstaller和tkcalendar。另外,在第一行放一个print语句,确保在控制台输出中看到它,记住**不要使用-w flag.thanx它在没有虚拟环境的情况下工作
pyinstaller -F --hidden-import "babel.numbers" test.py