Closed zkbaba closed 1 year ago
你好,我在吃席中。。。我看了一下报错信息,应该是pyinstaller这个模块出问题了。请问,你使用的版本是我框架里指定的版本吗?如果是用的我指定的版本,那么你尝试把pyinstaller升级到最新版试试看。
我使用的是框架里指定的版本,之后我升级了pyinstaller版本,还是不好使,后来我尝试了降级,还是不好使,我怀疑是cpu的问题,我之前使用公司inter的cpu电脑打包就没有问题,现在使用amd的cpu打包就出现问题了。还有一个问题,是当我在vue3的启动页面的onMount中请求python端的接口,会报错api找不到。不知道您遇到过没。
1、这样来看,应该就是硬件不同导致无法打包。这个估计就是pyinstaller包的问题了。。。 2、在onMount中,pywebview可能还没准备好。所以,我是在onMount中做了个定时操作。等pywebview准备好,再操作。如下所示:
老哥,求助啊,为啥打包不成功呢 报这个错误。老哥,看到了可以加个v吗,我v:zk-zkzk 25584 INFO: checking PYZ 25585 INFO: Building PYZ because PYZ-00.toc is non existent 25585 INFO: Building PYZ (ZlibArchive) build\cache\PYZ-00.pyz 26868 INFO: Building PYZ (ZlibArchive) build\cache\PYZ-00.pyz completed successfully. 26889 INFO: checking PKG 26889 INFO: Building PKG because PKG-00.toc is non existent 26890 INFO: Building PKG (CArchive) PPX.pkg 30979 INFO: Building PKG (CArchive) PPX.pkg completed successfully. 30982 INFO: Bootloader k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\bootloader\Windows-64bit-intel\runw.exe 30983 INFO: checking EXE 30983 INFO: Building EXE because EXE-00.toc is non existent 30983 INFO: Building EXE from EXE-00.toc 30983 INFO: Copying bootloader EXE to build\PPX.exe.notanexecutable Traceback (most recent call last): File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 33, in pywin32error yield File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\pywin32\win32api.py", line 209, in BeginUpdateResource return _resource._BeginUpdateResource(filename, delete) File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\core\cffi_resource.py", line 116, in _BeginUpdateResource str(pFileName), bDeleteExistingResources)) File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\core\cffi_util.py", line 78, in call self._raise_error(function_name) File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\core\cffi_util.py", line 89, in _raise_error raise exception OSError: [WinError 2] 系统找不到指定的文件。
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "D:\Anaconda3\lib\runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "D:\Anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "K:\project\dataset_detect_software\PPX-main2\pyapp\pyenv\pyenv\Scripts\pyinstaller.exe__main.py", line 7, in
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller__main.py", line 194, in _console_script_run
run()
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller__main__.py", line 180, in run
run_build(pyi_config, spec_file, **vars(args))
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\main.py", line 61, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\building\build_main.py", line 978, in main
build(specfile, distpath, workpath, clean_build)
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\building\build_main.py", line 900, in build
exec(code, spec_namespace)
File ".\pyapp\spec\windows.spec", line 66, in
icon=icoPath)
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\building\api.py", line 594, in init
self.postinit()
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\building\datastruct.py", line 173, in postinit__
self.assemble()
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\building\api.py", line 690, in assemble
winresource.RemoveAllResources(build_name)
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\PyInstaller\utils\win32\winresource.py", line 244, in RemoveAllResources
hsrc = win32api.BeginUpdateResource(filename, True) # bDeleteExistingResources=True
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\pywin32\win32api.py", line 209, in BeginUpdateResource
return _resource._BeginUpdateResource(filename, delete)
File "D:\Anaconda3\lib\contextlib.py", line 130, in exit__
self.gen.throw(type, value, traceback)
File "k:\project\dataset_detect_software\ppx-main2\pyapp\pyenv\pyenv\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (2, '', '系统找不到指定的文件。')