0

我在我的一个桌面应用程序中使用 BasicSR。它在 PyCharm 上运行良好。

但是在使用 pyinstaller 将其转换为 EXE 文件后,我遇到了以下错误。

我认为它可以是 os.scandir,但我该如何解决这个问题,我不知道..

请帮我解决这个问题,因为我已经花了很多时间..

Traceback (most recent call last):
File "yogeshbhaiDesktop.py", line 7, in
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "basicsr_init.py", line 3, in
File "", line 991, in _find_and_load
File "", line 975, in find_and_load_unlocked
File "", line 671, in load_unlocked
File "PyInstaller\loader\pyimod03_importers.py", line 546, in exec_module
File "basicsr\archs_init.py", line 14, in
File "basicsr\archs_init.py", line 14, in
File "basicsr\utils\misc.py", line 74, in _scandir
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'C:\Users\gbd\AppData\Local\Temp\_MEI45162\basicsr\archs'

.spec 文件:

# -*- mode: python ; coding: utf-8 -*-


block_cipher = None


a = Analysis(['yogeshbhaiDesktop.py'],
             pathex=['E:\\deployyPythonDesktop'],
             binaries=[],
             datas=[],
             hiddenimports=[],
             hookspath=['hook-basicsr.py'],
             hooksconfig={},
             runtime_hooks=[],
             excludes=[],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher,
             noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
             cipher=block_cipher)

exe = EXE(pyz,
          a.scripts,
          a.binaries,
          a.zipfiles,
          a.datas,  
          [],
          name='yogeshbhaiDesktop',
          debug=False,
          bootloader_ignore_signals=False,
          strip=False,
          upx=True,
          upx_exclude=[],
          runtime_tmpdir=None,
          console=False,
          disable_windowed_traceback=False,
          target_arch=None,
          codesign_identity=None,
          entitlements_file=None )

钩子-basicsr.py 文件

from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files("basicsr", includes=["archs/*_arch.py"])

提前致谢..

4

0 回答 0