PyInstaller - FileNotFoundError:没有这样的文件或目录:'' [英] PyInstaller - FileNotFoundError: No such file or directory: ''

查看:32
本文介绍了PyInstaller - FileNotFoundError:没有这样的文件或目录:''的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经看过很多关于这个相同错误代码的帖子,有很多不同的答案,但我仍然无法解决我的问题.

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: ''

有问题的文件是 ''(根本没有文件).我是 python 和 PyInstaller 的新手,对此我真的很困惑.

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

推荐答案

在 CArchive 步骤中,PyInstaller 尝试捆绑 Python DLL.这些名称是根据版本设置的,如果它是不受支持的 python 版本,PyInstaller 将返回一个空字符串.这就是导致错误的原因.请使用python 3.5-3.7

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

这篇关于PyInstaller - FileNotFoundError:没有这样的文件或目录:''的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆