使用pyinstaller 封装时报错
pyinstall -F myscript.py
错误:
AttributeError: module 'enum' has no attribute 'IntFlag'
pre-safe-import-module hook failed, needs fixing.
参考
- https://stackoverflow.com/questions/69151708/pyinstaller-python-pre-safe-import-module-hook-failed-needs-fixing
- pyinstaller-attributeerror-module-enum-has-no-attribute-intflag
$ pip3 uninstall -y enum34
卸载enum34$ pip3 uninstall -y enum34
WARNING: Ignoring invalid distribution -irtualenv (/Users/Rachel1900/anaconda3/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution - (/Users/Rachel1900/anaconda3/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution -irtualenv (/Users/Rachel1900/anaconda3/lib/python3.7/site-packages)
WARNING: Ignoring invalid distribution - (/Users/Rachel1900/anaconda3/lib/python3.7/site-packages)
Found existing installation: enum34 1.1.10
Uninstalling enum34-1.1.10:
Successfully uninstalled enum34-1.1.10
重新运行打包
出现超出循环报错
RecursionError: maximum recursion depth exceeded
【笔记|AttributeError: module ‘enum‘ has no attribute ‘IntFlag‘】原因参考:
recursion-error-python
推荐阅读
- FastAPI|FastAPI学习-7.POST请求body-多个参数
- jmeter|使用Robot Framework实现多平台自动化测试
- 用python实现表白
- #|送小公主——哆啦A梦(Python代码实现)
- #|她很焦虑,是时候送一波更高级的玫瑰(Python&Matlab实现)
- #|你值得拥有——流星雨下的告白(Python实现)
- #|信息时代——微信防撤回(Python实现)
- 密码学|遨游密码世界(一)
- 人工智能|人工智能---深度学习从感知机到神经网络