【Python】not allowed: --onedir/–onefilemakespec options not valid when a .spec file is given报错解决方案
大家好 我是寸铁👊
总结了一篇【Python】not allowed: --onedir/–onefilemakespec options not valid when a .spec file is given报错解决方案✨
喜欢的小伙伴可以点点关注 💝
前言
今天在使用
pyinstaller
打包时,报错如下:
具体如下:
[@localhost GCN_TSA]S pyinstaller-F GCN-TSA.spec223 INF0:PyInstaller:6.6.0,contrib hooks:2024.6
224 INF0:Python:3.10.6
225 INF0: Platform:Linux-3.10.0-327.el7.x86_64-x86_64-with-glibc2.17option(s)not allowed:
--onedir/--onefilemakespec options not valid when a .spec file is given
解决方案
打包
spec
文件要求不带参数,去掉参数-F
即可
pyinstaller xx.spec
成功打包!
看到这里的小伙伴,恭喜你又掌握了一个技能👊
希望大家能取得胜利,坚持就是胜利💪
我是寸铁!我们下期再见💕
往期好文💕
保姆级教程
【保姆级教程】Windows11下go-zero的etcd安装与初步使用
【保姆级教程】Windows11安装go-zero代码生成工具goctl、protoc、go-zero
【Go-Zero】手把手带你在goland中创建api文件并设置高亮
报错解决
【Go-Zero】Error: user.api 27:9 syntax error: expected ‘:‘ | ‘IDENT‘ | ‘INT‘, got ‘(‘ 报错解决方案及api路由注意事项
【Go-Zero】Error: only one service expected goctl一键转换生成rpc服务错误解决方案
【Go-Zero】【error】 failed to initialize database, got error Error 1045 (28000):报错解决方案
【Go-Zero】Error 1045 (28000): Access denied for user ‘root‘@‘localhost‘ (using password: YES)报错解决方案
【Go-Zero】type mismatch for field “Auth.AccessSecret“, expect “string“, actual “number“报错解决方案
【Go-Zero】Error: user.api 30:2 syntax error: expected ‘)‘ | ‘KEY‘, got ‘IDENT‘报错解决方案
【Go-Zero】Windows启动rpc服务报错panic:context deadline exceeded解决方案