将py文件打包成可执行文件
安装pyinstaller
pip install pyinstaller
打包执行文件
pyinstaller -F F:\AutomationTest\perf_tools.py
--onefile 将所有依赖项合并为单个可执行文件,而不是多个文件
打包成功后,当前目录生成一个dist文件夹
生成的可执行文件 xxx.exe
问题
AttributeError: ‘module’ object has no attribute’xxx’
解决方法
删除该库的.pyc文件