I have a small python script where I have only one dependency
from pandas import DataFrame as pdf
I want to create a .exe
that would only require users to have python installed in their PATH
. This guide helped me run the creation but the yielding dist folder is empty. Does anyone know why this is the case or
what I am doing wrong?
Specs: written in and for Windows OS
, Python 3.6.5
- Anaconda
Edit: Here's the sample I am working with.
from pandas import DataFrame as pdf
if "__main__":
df = pdf([['This', 'is'], ['a', 'Test']],
index=['Row 1', 'Row 2'],
columns=['col 1', 'col 2'])
df.to_excel("output\output.xlsx")
The resulting spec
file is
# -*- mode: python -*-
block_cipher = None
a = Analysis(['src\\sample.py'],
pathex=['C:\\Users\\kpiq\\Documents\\Data Science\\Executable Creation'],
binaries=[],
datas=[],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
[],
exclude_binaries=True,
name='sample',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='sample')
The command used was pyinstaller src\sample.py