PyInstaller - FileNotFoundError: No such file or directory: ''

让人想犯罪 __ 提交于 2021-01-27 18:47:11

问题


I've have seen many posts about this very same error code with many different answers and I still can't fix my problem.

The difference of mine from all the other posts is that I get the following:

317 INFO: Building PKG because PKG-00.toc is non existent
318 INFO: Building PKG (CArchive) PKG-00.pkg
Traceback (most recent call last):
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.752.0_x64__qbz5n2kfra8p0\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\Christopher\Desktop\project\venv\Scripts\pyinstaller.exe\__main__.py", line 7, in <module>
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\__main__.py", line 114, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\__main__.py", line 65, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\build_main.py", line 729, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\build_main.py", line 676, in build
    exec(code, spec_namespace)
  File "C:\Users\Christopher\Desktop\project\main.spec", line 20, in <module>
    exe = EXE(pyz,
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\api.py", line 433, in __init__
    self.pkg = PKG(self.toc, cdict=kwargs.get('cdict', None),
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\api.py", line 199, in __init__
    self.__postinit__()
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in __postinit__
    self.assemble()
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\api.py", line 259, in assemble
    fnm = checkCache(fnm, strip=self.strip_binaries,
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\utils.py", line 213, in checkCache
    digest = cacheDigest(fnm, redirects)
  File "c:\users\christopher\desktop\project\venv\lib\site-packages\PyInstaller\building\utils.py", line 358, in cacheDigest
    with open(fnm, "rb") as f:
FileNotFoundError: [Errno 2] No such file or directory: ''

The file in question is '' (No file at all). I'm new to python and PyInstaller and I am really confused about this.


回答1:


In the CArchive step PyInstaller tries to bundle the Python DLLs. These names are set dependent on the version, and PyInstaller will return an empty string if it's an unsupported version of python. That is what is causing the error. Please use python 3.5-3.7



来源:https://stackoverflow.com/questions/60471485/pyinstaller-filenotfounderror-no-such-file-or-directory

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!