Python打包程序成exe报错合集
报错1
报错内容
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/pyinstaller/
tFoundError(2, 'No such file or directory'))': /simple/pyinstaller/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/pyinstaller/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/pyinstaller/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', FileNotFoundError(2, 'No such file or directory'))': /simple/pyinstaller/
ERROR: Could not find a version that satisfies the requirement pyinstaller (from versions: none)
ERROR: No matching distribution found for pyinstaller
原因
使用FQ软件,需关闭FQ软件
参考文章
【完美解决】WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None))
报错2
报错内容
Syntax error in E:\work\25\python\FREQ_lasttime-0526\FREQ\SerialDebugAssistant.py
File "E:\work\25\python\FREQ_lasttime-0526\FREQ\SerialDebugAssistant.py", line 288
else
^
SyntaxError: invalid syntax
原因
忘记if , elif , else , for , while , class ,def 声明末尾添加 冒号( : )
参考文章
【python】错误SyntaxError: invalid syntax的解决方法总结
报错3
报错内容
ValueError: Received icon image 'E:\work\25\python\FREQ_lasttime-0526\FREQ\freq.ico' which exists but is not in the correct format. On this platform, only ('exe', 'ico') images may be used as icons. If Pillow is installed, automatic conversion will be attempted. Please install Pillow or convert your 'ico' file to one of ('exe', 'ico') and try again.
原因
打包图片格式不对
                    
                
                
            
        
浙公网安备 33010602011771号