Reputation: 1
I'm working on a python project which needs me to develop a GUI using streamlit to take some user inputs and do some calculations using octave scripts and display results in the streamlit GUI. I'd packaged the entire application using pyinstaller and the executable is running completely fine in my PC. But when I sent the executable along with the entire project folder to a different PC, it gives the error " streamlit is not recognised as an internal or external command, operable program or batch file."
That PC has octave and python installed.
I'm attaching the .spec
file for reference.
# -*- mode: python ; coding: utf-8 -*-
from PyInstaller.utils.hooks import collect_all, copy_metadata
datas = []
binaries = []
hiddenimports = []
tmp_ret = collect_all('debugpy')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('octave_kernel')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('streamlit')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('oct2py')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('multiprocessing')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('PIL')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
tmp_ret = collect_all('streamlit_option_menu')
datas += tmp_ret[0]; binaries += tmp_ret[1]; hiddenimports += tmp_ret[2]
hiddenimports += [
'streamlit',
'streamlit.runtime.scriptrunner.script_run_context',
'streamlit.components.v1',
'streamlit.runtime.legacy_caching.hashing',
'streamlit.proto',
'streamlit.type_util',
'streamlit.server.server',
'streamlit.logger',
]
datas += copy_metadata('streamlit_extras')
datas += [('Frontend/*', 'Frontend'),('Frontend/pages/*', 'Frontend/pages'),('backend_codes/*', 'backend_codes'),('Plots/', 'Plots'), ('variable_text_files/*', 'variable_text_files')]
a = Analysis(
['my_app.py'],
pathex=[],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
optimize=0,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='BulletTrain',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)
How to ensure the executable is running properly in a different pc?
I listed down every module and package used in the project in the hiddenimports section properly, nothing else left out. Still not working..
Upvotes: 0
Views: 40