报错信息:
58 INFO: PyInstaller: 4.4 58 INFO: Python: 3.9.2 59 INFO: Platform: Windows-10-10.0.19041-SP0 60 INFO: wrote E:\py_pro\main.spec 127 INFO: UPX is available. 128 INFO: Extending PYTHONPATH with paths ['E:\py_pro', 'E:\py_pro'] 134 INFO: checking Analysis 160 INFO: checking PYZ 175 INFO: checking PKG 175 INFO: Building PKG because PKG-00.toc is non existent 175 INFO: Building PKG (CArchive) PKG-00.pkg Traceback (most recent call last): File "c:\users\lenovo\appdata\local\programs\python\python39\lib\runpy.py", line 197, in run_module_as_main return run_code(code, main_globals, None,"main", mod_spec) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\runpy.py", line 87, in run_code exec(code, run_globals) File "C:\Users\lenovo\AppData\Local\Programs\Python\Python39\Scripts\pyinstaller.exe_main.py", line 7, in File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller_main.py", line 126, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller_main.py", line 65, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 758, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\build_main.py", line 705, in build exec(code, spec_namespace) File "E:\py_pro\main.spec", line 23, in exe = EXE(pyz, File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\api.py", line 509, in init self.pkg = PKG(self.toc, cdict=kwargs.get('cdict', None), File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\api.py", line 208, in init self.postinit() File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\datastruct.py", line 159, in postinit self.assemble() File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\api.py", line 274, in assemble fnm = checkCache(fnm, strip=self.strip_binaries, File "c:\users\lenovo\appdata\local\programs\python\python39\lib\site-packages\PyInstaller\building\utils.py", line 308, in checkCache shutil.copy(fnm, cachedfile) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\shutil.py", line 418, in copy copyfile(src, dst, follow_symlinks=follow_symlinks) File "c:\users\lenovo\appdata\local\programs\python\python39\lib\shutil.py", line 264, in copyfile with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst: PermissionError: [Errno 13] Permission denied: 'C:\Users\lenovo\AppData\Local\pyinstaller\bincache01_py39_64bit\d3dcompiler_47.dll'
验证过以下步骤
1.验证其他的.py文件,是可以正常生成的。
2.找到python下的d3dcompiler_47.dll放入下面路径也是不对的
PermissionError: [Errno 13] Permission denied: 'C:\Users\lenovo\AppData\Local\pyinstaller\bincache01_py39_64bit\d3dcompiler_47.dll'