pyninstaller错误:忽略明确参数'--
我写了一个简单的脚本,用来画箱线图,使用了三个模块:numpy、os(用来处理路径)和matplotlib.pyplot。
当我在终端运行pyinstaller时,我输入了这个命令:
(spyder_env) D:\Scipts_homemade>pyinstaller -F-- hiddenimport=numpy -F--hiddenimport=os -F--hiddenimport=matplotlib.pyplot -F--collect-submodules=numpy -F--collect-submodules=matplotlib.pyplot -F--onefile BOX_PLOT_interactive.py
输出结果是:
pyinstaller: error: argument -F/--onefile: ignored explicit argument '--''
where is my mistake?
谢谢你
希望能帮我找出错误,可能是因为命令写错了或者缺少某个模块。
1 个回答
1
-F
和 --onefile
是一样的意思。
另外,应该是 --hidden-import
,而不是 --hiddenimport
。
可以这样做:
pyinstaller --onefile --hidden-import=numpy --hidden-import=os --hidden-import=matplotlib.pyplot --collect-submodules=numpy --collect-submodules=matplotlib.pyplot BOX_PLOT_interactive.py