pyinstaller exe 不是 运行 - 没有名为 Pyside 的模块
pyinstaller exe not running - No module named Pyside
如果 运行 来自 Python,我的程序工作正常。
我现在使用 Pyinstaller 将其打包成一个 exe。
pyinstaller --onefile path/to/my/file.py
我可以 运行 exe,如果其他人的系统上安装了 Python,我也可以。
如果 Python 未 未安装 ,当 exe 运行 通过终端时,会看到此错误:
ImportError: No module named 'Pyside'
程序不使用这个模块。
它使用的唯一库是:
os、sys、glob、selenium、PyQt4、警告
因为我使用的是 Python 3.5.
,所以安装和导入 Pyside 不是一个选项(我已经试过了)
为什么创建的 exe 在没有 Python 的系统上寻找 PySide 模块,但在安装了 Python 的系统上却找不到?
谢谢
编辑 1
看来问题出在 PyQt4 上,因为下面的程序会崩溃,但是在没有 [=53] 的系统上,带有任何其他模块的程序将 运行 =].
"""
Created on Mon Jan 9 09:23:13 2017
@author: me
"""
import PyQt4
print("This program simply tests if a packaged\npython program runs on your system!\n")
input("Press Enter to exit...")
编辑 2
程序构建时的终端输出示例。
对此的解决方案是 将 Python 版本回滚到 3.4 发行版。
一旦安装了所需的模块(PyQt4 和 PyInstaller (v3.2)),就可以像以前一样毫无问题地使用 PyInstaller。
生成的 exe 能够 运行 在有和没有 Python 的两个系统上都没有错误。
PyInstaller 的这个问题的跟踪是 here。
谢谢
如果 运行 来自 Python,我的程序工作正常。
我现在使用 Pyinstaller 将其打包成一个 exe。
pyinstaller --onefile path/to/my/file.py
我可以 运行 exe,如果其他人的系统上安装了 Python,我也可以。
如果 Python 未 未安装 ,当 exe 运行 通过终端时,会看到此错误:
ImportError: No module named 'Pyside'
程序不使用这个模块。 它使用的唯一库是:
os、sys、glob、selenium、PyQt4、警告
因为我使用的是 Python 3.5.
,所以安装和导入 Pyside 不是一个选项(我已经试过了)为什么创建的 exe 在没有 Python 的系统上寻找 PySide 模块,但在安装了 Python 的系统上却找不到? 谢谢
编辑 1
看来问题出在 PyQt4 上,因为下面的程序会崩溃,但是在没有 [=53] 的系统上,带有任何其他模块的程序将 运行 =].
"""
Created on Mon Jan 9 09:23:13 2017
@author: me
"""
import PyQt4
print("This program simply tests if a packaged\npython program runs on your system!\n")
input("Press Enter to exit...")
编辑 2
程序构建时的终端输出示例。
对此的解决方案是 将 Python 版本回滚到 3.4 发行版。
一旦安装了所需的模块(PyQt4 和 PyInstaller (v3.2)),就可以像以前一样毫无问题地使用 PyInstaller。
生成的 exe 能够 运行 在有和没有 Python 的两个系统上都没有错误。
PyInstaller 的这个问题的跟踪是 here。
谢谢