xxxxxxxxxx
pyi-makespec --onefile yourprogram.py
xxxxxxxxxx
# -*- mode: python ; coding: utf-8 -*-
import sys # added line
from os import path # added line
site_packages = next(p for p in sys.path if 'site-packages' in p) # added line
block_cipher = None
# add in template in datas
a = Analysis(['your_file.py'],
pathex=['C:\\Users\\Desktop'],
binaries=[],
datas=[(path.join(site_packages,"pptx","templates"), "pptx/templates")],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
# rest of the file doesn't need any modification
xxxxxxxxxx
# -*- mode: python ; coding: utf-8 -*-
import sys # added line
from os import path # added line
site_packages = next(p for p in sys.path if 'site-packages' in p) # added line
block_cipher = None
# add in template in datas
a = Analysis(['your_file.py'],
pathex=['C:\\Users\\Desktop'],
binaries=[],
datas=[(path.join(site_packages,"pptx","templates"), "pptx/templates")],
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
# rest of the file doesn't need any modification