【200213】pyinstaller打包py为exe遭遇“'upx' 不是内部或外部命令,也不是可运行的程序”

41 INFO: PyInstaller: 3.6
41 INFO: Python: 3.7.6
43 INFO: Platform: Windows-10-10.0.18362-SP0
44 INFO: wrote C:\Users\JuneRain\xxxx\up.spec
‘upx’ 不是内部或外部命令,也不是可运行的程序
或批处理文件。
55 INFO: UPX is not available.
56 INFO: Extending PYTHONPATH with paths
[‘C:\Users\JuneRain\xxxx’, ‘C:\Users\JuneRain\xxxx’]
56 INFO: checking Analysis
57 INFO: Building Analysis because Analysis-00.toc is non existent
57 INFO: Initializing module dependency graph…
59 INFO: Caching module graph hooks…
65 INFO: Analyzing base_library.zip …
2158 INFO: Caching module dependency graph…
2203 INFO: running Analysis Analysis-00.toc
2205 INFO: Adding Microsoft.Windows.Common-Controls to dependent assemblies of final executable
required by c:\users\junerain\appdata\local\programs\python\python37\python.exe
2266 INFO: Analyzing C:\Users\JuneRain\xxxx\up.py
2378 INFO: Processing pre-safe import module hook urllib3.packages.six.moves
pre-safe-import-module hook failed, needs fixing.

错误原因:前段时间修改过“subprocess.py”,把其中的“Popen”“shell=False”改成了“True”。
【200213】pyinstaller打包py为exe遭遇“'upx' 不是内部或外部命令,也不是可运行的程序”_第1张图片
解决方案:
everything搜索“subprocess.py”,打开最近修改过的“subprocess.py”,把“Popen”“shell=True”改回来。
【200213】pyinstaller打包py为exe遭遇“'upx' 不是内部或外部命令,也不是可运行的程序”_第2张图片

你可能感兴趣的:(python学习)