-
-
Notifications
You must be signed in to change notification settings - Fork 2k
-
格式:
1.使用的打包框架(e.g. pyinstaller/py2exe ... 版本号) 例如 pyinstaller 3.4;
2.出现的错误;
...
3.解决办法;
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 17 comments 1 reply
-
1、打包框架:pyinstaller3.4
2、出现的错误:
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (1006, 'LoadLibraryEx', '文件所在的卷已被外部更改,因此打开的文件不再有效。')
3、解决办法:
暂未解决
Beta Was this translation helpful? Give feedback.
All reactions
-
1 打包框架 pyinstaller3.4
2 报错。5588 WARNING: One binary added with two internal names.
5588 WARNING: ('libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')
5589 WARNING: was placed previously at
5589 WARNING: ('PyQt5\Qt\bin\libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')
解决办法: 没有找到!。
Beta Was this translation helpful? Give feedback.
All reactions
-
打包结束后,可以尝试手动复制这几个dll文件,到PyQt5\Qt\bin\目录下
Beta Was this translation helpful? Give feedback.
All reactions
-
1 打包框架 pyinstaller(最新版本)
2 报错。5588 WARNING: One binary added with two internal names.
5588 WARNING: ('libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')
5589 WARNING: was placed previously at
5589 WARNING: ('PyQt5\Qt\bin\libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')解决办法: 没有找到!。
打包能出.exe 但是运行的时候, 一闪而过
Beta Was this translation helpful? Give feedback.
All reactions
-
1 打包框架 pyinstaller(最新版本)
2 报错。5588 WARNING: One binary added with two internal names.
5588 WARNING: ('libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')
5589 WARNING: was placed previously at
5589 WARNING: ('PyQt5\Qt\bin\libGLESv2.dll',
'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll',
'BINARY')
解决办法: 没有找到!。打包能出.exe 但是运行的时候, 一闪而过
-w参数试试
-w 表示去掉控制台窗口,这在GUI界面时非常有用。不过如果是命令行程序的话那就把这个选项删除吧!
Beta Was this translation helpful? Give feedback.
All reactions
-
@zouhaozouhao 看一下'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll' 这个dll文件存不存在,打包的时候加上控制台方式,然后在cmd中运行,看看有没有错误提示
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git 把你的杀毒安全等软件先关掉,另外在非共享目录测试,把脚本放到桌面上新建文件夹里测试下打包
Beta Was this translation helpful? Give feedback.
All reactions
-
@zouhaozouhao 看一下'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll' 这个dll文件存不存在,打包的时候加上控制台方式,然后在cmd中运行,看看有没有错误提示
这个libGLESv2.dll文件存在。 使用 pyinstaller -w UI.py , 在运行的时候, 没有warning, 但是生成之后, 在dist 文件下找到UI.exe运行, 显示 Failed to execute script UI. 请问这个情况下要怎么去进一步的调试
Beta Was this translation helpful? Give feedback.
All reactions
-
@zouhaozouhao 看一下'D:\python_work11円\venv\lib\site-packages\PyQt5\Qt\bin\libGLESv2.dll' 这个dll文件存不存在,打包的时候加上控制台方式,然后在cmd中运行,看看有没有错误提示
这个libGLESv2.dll文件存在。 使用 pyinstaller -w UI.py , 在运行的时候, 没有warning, 但是生成之后, 在dist 文件下找到UI.exe运行, 显示 Failed to execute script UI. 请问这个情况下要怎么去进一步的调试
重新看了一下 CMD, 发现INFO 中 有这些个提示
- 56 INFO: Building Analysis because Analysis-00.toc is non existent
2.5067 INFO: Warnings written to D:\python_WORK1\design\build\UI\warn-UI.txt
3.5612 INFO: Building PKG because PKG-00.toc is non existent
3.5629 INFO: Building COLLECT because COLLECT-00.toc is non existent
可能是 这些文件的报错导致了.exe 文件生成不对吗?
Beta Was this translation helpful? Give feedback.
All reactions
-
@zouhaozouhao 先试试简单脚本打包,有可能是有些import的模块没打包进去,用控制台方式,运行也是cmd里打开exe
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git 把你的杀毒安全等软件先关掉,另外在非共享目录测试,把脚本放到桌面上新建文件夹里测试下打包
仔细看了下出错信息应该是LoadLibraryEx这个找不到
跟这个的问题差不过
https://stackoverflow.com/questions/49469386/pywintypes-error-with-pyinstaller
测试了简单脚本打包都正常
用到了QWebEngineView
我的环境是64位win10+64位anaconda3
不知道跟这个有没有关系
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git QWebEngineView 这个东西好像不能自动打包过去,不知道pyinstaller支不支持。QtWebEngineProcess.exe 这个文件要复制到打包后的目录里面去。相关的还有translations\qtwebengine_locales 这些文件
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git QWebEngineView 这个东西好像不能自动打包过去,不知道pyinstaller支不支持。QtWebEngineProcess.exe 这个文件要复制到打包后的目录里面去。相关的还有translations\qtwebengine_locales 这些文件
我目前不是找不到
而是exe都编译不过去
请教PyQtClient的python环境是32位还是64位
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git PyQtClient 是32位,我没有打包。是直接整个python纯净环境+PyQt库
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git PyQtClient 是32位,我没有打包。是直接整个python纯净环境+PyQt库
我看有个PyQtClient-x86-win32-exe
这个不是编译后的
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git PyQtClient 是32位,我没有打包。是直接整个python纯净环境+PyQt库
我看有个PyQtClient-x86-win32-exe
这个不是编译后的
我并没有编译,而是使用C++写了一个exe加载python.dll 直接执行主文件.py 就好比在命令行下用python.exe xxx.py一样的道理
Beta Was this translation helpful? Give feedback.
All reactions
-
@lls-git PyQtClient 是32位,我没有打包。是直接整个python纯净环境+PyQt库
我看有个PyQtClient-x86-win32-exe
这个不是编译后的我并没有编译,而是使用C++写了一个exe加载python.dll 直接执行主文件.py 就好比在命令行下用python.exe xxx.py一样的道理
哦
我还以为必须是32位python
刚准备再装个试下呢
我再找找
谢谢
Beta Was this translation helpful? Give feedback.
All reactions
-
2:
pyinstaller在 pyqt5.12版本之后打包的一个问题 , 在本机打包后可以用, 到别的机器就不行
ImportError: unable to find Qt5Core.dll on PATH
[12876] Failed to execute script ui
可以先降为pyqt5.10.1 + pyinstaller 3.4 打包 ;
或者在这里面找找解决办法:
pyinstaller/pyinstaller#4293 (comment)
Beta Was this translation helpful? Give feedback.