草庐IT

PyInstaller

全部标签

python - 使用 pyinstaller 时 .exe 文件过大

我搜索了一下这个问题,人们提示可执行文件大小为30mb~100mb,但出于某种原因我的是300mb。我可能是错的,但我不认为这是正常的。我尝试使用其他替代方案,如cx_Freeze,但我得到了相同的结果。这是我的项目中的内容:fromPyQt5importQtCore,QtGui,QtWidgetsfrompyplotimportfunctionsasplotif__name__=="__main__":importsysapp=QtWidgets.QApplication(sys.argv)window=QtWidgets.QDialog()ui=Ui_Dialog()ui.setu

Python:如何在 Pyinstaller .spec 文件中指定输出文件夹

我使用的是python3.5和pyinstaller版本3.1.1。我指定了一个名为SCADAsync_spec.spec的.spec文件,如下所示:block_cipher=Nonea=Analysis(['SCADAsync.py'],pathex=['C:\\repo\\analysis\\trunk\\source\\python\\functions','C:\\repo\\analysis\\trunk\\source\\python\\Executables'],binaries=None,datas=[('figs\\ROMO_icon.ico','figs'),('f

python - pyInstaller 多次加载脚本

我现在已经设法让pyinstaller或多或少正确地运行,只是它打开了太多窗口。它是pygame项目,它会每隔一秒左右重新加载整个项目。几秒钟后,我的PC充满了游戏窗口,然后一切都停止了。从命令行运行它,我只能看到打印输出说应用程序开始在命令行窗口中一遍又一遍地粘贴。据我所知,应用程序并没有关闭或退出,只是越来越多。我调用的启动pyinstaller的命令是这样的:pyinstaller--onedirmain_local.py主文件如下所示:#Libraryimportsimportpygame#Projectimportsfrommultiroidal_clientimportMu

python - pyinstaller创建的exe文件,运行时找不到自定义模块

我创建了两个python文件,目录/文件关系如下:mytest---|---mycommon.py|---myMainDir---|----myMain.py在mycommon.py中:defmyFunc(a):...在myMain.py中:importsyssys.path.append(os.path.join(os.path.dirname(os.path.abspath('__file__')),'..'))importmycommon.pymycommon.myFunc("abc")然后我使用pyinstaller创建了exe:pyinstall.py-Fmytest\myM

python - Pyinstaller - ImportError : No system module 'pywintypes' (pywintypes27. dll)

我正在尝试将我的python脚本打包成可执行文件。我认为我会非常直截了当,因为我没有太多进口商品。首先是我的进口商品:from__future__importprint_functionfromnetCDF4importDatasetimportnumpyasnpimportosfromprogressbarimportPercentage,Bar,ETA,ProgressBar,RotatingMarker我知道numpy受支持我不确定__future__或os我确定netCDF4和progressbar不受支持。我在Windows7的Python2.7.7上使用pyinstalle

python - 修复使用 py2exe(或 PyInstaller)编译的 exe 中的 SSL 证书错误

我刚刚测试了一个Python程序,该程序涉及登录站点并需要设置CSRFcookie。我尝试使用py2exe将其打包为exe,但出现套接字错误。当我尝试使用PyInstaller时,我遇到了同样的问题。谷歌搜索Errno,我发现其他几个人也有同样的问题,所以我知道问题与SLL证书的位置有关。这是我的site_agent类,包括日志调用。classsite_agent:self.get_params()URL=root_url+'/accounts/login/'#RetrievetheCSRFtokenfirstself.agent=requests.session()self.agen

python - PyInstaller 运行时错误? (R6034)

我终于让PyInstaller构建了一个exe文件,但它没有运行。我一打开它,就会在一个对话框中看到这个:RuntimeError!ProgramC:\.....\MCManager.exeR6034AnapplicationhasmadeanattempttoloadtheCruntimelibraryincorrectly.Pleasecontacttheapplication'ssupportteamformoreinformation.这是我的规范:#-*-mode:python-*-a=Analysis(['MCManager.py'],pathex=['C:\\Users\

python - PyInstaller 不导入队列

我正在尝试使用twisted和Queue编译一些脚本。pyinstallersample.py--onefile#-*-coding:utf-8-*-#fromtwistedimport*importqueueasQueuea=Queue.Queue()不幸的是,生成的文件失败并显示ImportError:Nomodulenamedqueue。 最佳答案 我认为这根本不是PyInstaller或Twisted相关的问题。Queue模块是标准库的一部分,问题在于您如何命名它。在Python2中,它是带有大写字母的Queue,但在Pyt

python - 使用 pyinstaller 后执行编译文件 "No module named ' scipy._lib.messagestream' 时出错

我正在尝试编译我们的代码https://bitbucket.org/OES_muni/massiveoes从python2.7升级到3.6并同时移动到scipy1.0.0后使用pyinstaller。我在64位win7机器上工作。程序本身运行良好,pyinstaller运行没有错误,但是当我尝试运行构建exe文件时,它给了我这个错误:Traceback(mostrecentcalllast):File"massiveOES\GUI.py",line23,inFile"c:\users\petr\envs\py1\lib\site-packages\PyInstaller\loader\

python - 使用pyinstaller生成exe文件报错-typeerror : expected str, bytes or os.PathLike object, not NoneType

我正在尝试使用pysinstaller和Python3.7.2从.py文件构建一个.exe文件。它适用于Python3.6;然后我重新安装了最新版本的Python(3.7.2)并尝试生成一个exe文件,但是pyinstallerbarfs。下面是我得到的错误报告。(venv)C:\Users\user\Desktop\untitled1>pyinstallertest.py53INFO:PyInstaller:3.453INFO:Python:3.7.254INFO:Platform:Windows-10-10.0.17134-SP058INFO:wroteC:\Users\user\