Skip to content

Instantly share code, notes, and snippets.

@tarrzan33
Last active March 29, 2018 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarrzan33/704b083805856641a68b81fc82bca1b6 to your computer and use it in GitHub Desktop.
Save tarrzan33/704b083805856641a68b81fc82bca1b6 to your computer and use it in GitHub Desktop.
Spec file:
# -*- mode: python -*-
block_cipher = None
a = Analysis(['main.py'],
pathex=['C:\\Users\\ztarr\\Desktop\\Exe Test - Copy'],
binaries=[],
datas=[],
hiddenimports=['pahk','sqlite3'],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
exclude_binaries=True,
name='main',
debug=False,
strip=False,
upx=True,
console=True )
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='main')
**********
C:\Users\ztarr\Desktop\Exe Test - Copy>py -3.5 -m PyInstaller main.spec
485 INFO: PyInstaller: 3.3.1
485 INFO: Python: 3.5.4
485 INFO: Platform: Windows-10-10.0.16299-SP0
500 INFO: UPX is not available.
500 INFO: Extending PYTHONPATH with paths
['C:\\Users\\ztarr\\Desktop\\Exe Test - Copy',
'C:\\Users\\ztarr\\Desktop\\Exe Test - Copy']
500 INFO: checking Analysis
615 INFO: checking PYZ
662 INFO: checking PKG
677 INFO: Building because C:\Users\ztarr\Desktop\Exe Test - Copy\build\main\main.exe.manifest changed
677 INFO: Building PKG (CArchive) out00-PKG.pkg
715 INFO: Building PKG (CArchive) out00-PKG.pkg completed successfully.
715 INFO: Bootloader C:\Python35-32\lib\site-packages\PyInstaller\bootloader\Windows-32bit\run.exe
715 INFO: checking EXE
731 INFO: Building because manifest changed
731 INFO: Building EXE from out00-EXE.toc
731 INFO: Appending archive to EXE C:\Users\ztarr\Desktop\Exe Test - Copy\build\main\main.exe
731 INFO: Building EXE from out00-EXE.toc completed successfully.
747 INFO: checking COLLECT
747 INFO: Building COLLECT out00-COLLECT.toc
1424 INFO: Building COLLECT out00-COLLECT.toc completed successfully.
C:\Users\ztarr\Desktop\Exe Test - Copy>cd dist/main
C:\Users\ztarr\Desktop\Exe Test - Copy\dist\main>main.exe
Traceback (most recent call last):
File "C:\Users\ztarr\Desktop\Exe Test - Copy\main.py", line 4, in <module>
import makeAHK as ahk
File "C:\Python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "makeAHK.py", line 1, in <module>
File "C:\Python35-32\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 631, in exec_module
exec(bytecode, module.__dict__)
File "site-packages\pahk.py", line 4, in <module>
ImportError: cannot import name 'getsitepackages'
[14568] Failed to execute script main
C:\Users\ztarr\Desktop\Exe Test - Copy\dist\main>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment