79141514

Date: 2024-10-30 14:29:29
Score: 0.5
Natty:
Report link

It turns out the information I've seen is incorrect. You need to include the path to your imported scripts in the pathex portion of the spec file (or use --paths when building without a spec file.

a = Analysis(
    ['c:\\Users\\name\\python_projects\\projectname\\src\\projectname\\main_script.py'],
    pathex=['c:\\Users\\name\\python_projects\\projectname\\.venv\\Lib\\site-packages', 'c:\\Users\\name\\python_projects\\projectname\\src\\projectname'],
    binaries=[],
    datas=[],
    hiddenimports=[],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    noarchive=False,
    optimize=0,
)
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jim Rutter