pyinstaller打包使用GLPK+pulp库的脚本在其他电脑上运行报错

我用pyinstaller打包了一个py文件,在本机运行正确,在别的电脑上运行报错:

pulp.apis.core.PulpSolverError:PuLP: cannot execute glpsol.exe
[15296] Failed to execute script test.py

这个脚本主要用于解决线性规划问题,使用了pulp库,而pulp调用了GLPK,配置GLPK还需要安装Visual Studio,我猜想是pyinstaller打包时并没有将GLPK及其依赖环境一起打包进去导致的错误,请教要如何将第三方库调用的程序及其环境一起打包?

谢谢!谢谢!

我在打包时加上了二进制文件路径参数,但问题依旧。

pyinstaller -F --add-binary "..\..\..\Program Files\GLPK 4.65\w64\glpsol.exe;lib" -i programming.ico test.py