Skip to content

dart run serious_python:main package dont install modules into the zip file? #192

@kiwimarc

Description

@kiwimarc

I'm trying to run this command:
dart run serious_python:main package ..\python-engine\ --asset assets/python/app.zip -p Windows --requirements '-r ..\..\assets\python\requirements.txt' --verbose

It seems like its running great:

Running build hooks... (1.5s)
Building package executable...
Built serious_python:main.
Running package command
Extra PyPi indexes: [https://pypi.flet.dev]
Created temp directory: C:\Users\NAME\AppData\Local\Temp\serious_python_temp8ddc07f5
Copying Python app from C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\..\python-engine\ to a temp directory
VERBOSE: Configured Windows/ platform with sitecustomize.py at C:\Users\NAME\AppData\Local\Temp\serious_python_sitecustomize764ed638\sitecustomize.py
Installing [-r ..\..\assets\python\requirements.txt] with pip command to C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\site-packages
VERBOSE: Downloading Python distributive from https://github.com/astral-sh/python-build-standalone/releases/download/20250205/cpython-3.12.9+20250205-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz to C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\cpython-3.12.9+20250205-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz
VERBOSE: Extracting Python distributive from C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\cpython-3.12.9+20250205-x86_64-pc-windows-msvc-shared-install_only_stripped.tar.gz to C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\build_python_3.12.9
VERBOSE: C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\build_python_3.12.9\python\python.exe -m pip install --upgrade --disable-pip-version-check --extra-index-url https://pypi.flet.dev --target C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\build\site-packages -r ..\..\assets\python\requirements.txt
VERBOSE: Looking in indexes: https://pypi.org/simple, https://pypi.flet.dev
VERBOSE: Collecting pandas (from -r  ..\..\assets\python\requirements.txt (line 1))
VERBOSE: 
VERBOSE: Using cached pandas-3.0.0-cp312-cp312-win_amd64.whl.metadata (19 kB)
VERBOSE:
VERBOSE: Collecting matplotlib (from -r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: Using cached matplotlib-3.10.8-cp312-cp312-win_amd64.whl.metadata (52 kB)
VERBOSE: Collecting numpy>=1.26.0 (from pandas->-r  ..\..\assets\python\requirements.txt (line 1))
VERBOSE: 
VERBOSE: Using cached numpy-2.4.2-cp312-cp312-win_amd64.whl.metadata (6.6 kB)
VERBOSE:
VERBOSE: Collecting python-dateutil>=2.8.2 (from pandas->-r  ..\..\assets\python\requirements.txt (line 1))
VERBOSE: 
VERBOSE: Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
VERBOSE:
VERBOSE: Collecting tzdata (from pandas->-r  ..\..\assets\python\requirements.txt (line 1))
VERBOSE: Using cached tzdata-2025.3-py2.py3-none-any.whl.metadata (1.4 kB)
VERBOSE:
VERBOSE: Collecting contourpy>=1.0.1 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: 
VERBOSE: Using cached contourpy-1.3.3-cp312-cp312-win_amd64.whl.metadata (5.5 kB)
VERBOSE:
VERBOSE: Collecting cycler>=0.10 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: 
VERBOSE: Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
VERBOSE:
VERBOSE: Collecting fonttools>=4.22.0 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: Using cached fonttools-4.61.1-cp312-cp312-win_amd64.whl.metadata (116 kB)
VERBOSE:
VERBOSE: Collecting kiwisolver>=1.3.1 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: 
VERBOSE: Using cached kiwisolver-1.4.9-cp312-cp312-win_amd64.whl.metadata (6.4 kB)
VERBOSE:
VERBOSE: Collecting packaging>=20.0 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: 
VERBOSE: Using cached packaging-26.0-py3-none-any.whl.metadata (3.3 kB)
VERBOSE:
VERBOSE: Collecting pillow>=8 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: Using cached pillow-12.1.1-cp312-cp312-win_amd64.whl.metadata (9.0 kB)
VERBOSE:
VERBOSE: Collecting pyparsing>=3 (from matplotlib->-r  ..\..\assets\python\requirements.txt (line 2))
VERBOSE: 
VERBOSE: Using cached pyparsing-3.3.2-py3-none-any.whl.metadata (5.8 kB)
VERBOSE:
VERBOSE: Collecting six>=1.5 (from python-dateutil>=2.8.2->pandas->-r  ..\..\assets\python\requirements.txt (line 1))
VERBOSE: 
VERBOSE: Using cached six-1.17.0-py2.py3-none-any.whl.metadata (1.7 kB)
VERBOSE:
VERBOSE: Using cached pandas-3.0.0-cp312-cp312-win_amd64.whl (9.7 MB)
VERBOSE:
VERBOSE: Using cached matplotlib-3.10.8-cp312-cp312-win_amd64.whl (8.1 MB)
VERBOSE:
VERBOSE: Using cached contourpy-1.3.3-cp312-cp312-win_amd64.whl (226 kB)
VERBOSE:
VERBOSE: Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
VERBOSE: Using cached fonttools-4.61.1-cp312-cp312-win_amd64.whl (2.3 MB)
VERBOSE:
VERBOSE: Using cached kiwisolver-1.4.9-cp312-cp312-win_amd64.whl (73 kB)
VERBOSE:
VERBOSE: Using cached numpy-2.4.2-cp312-cp312-win_amd64.whl (12.3 MB)
VERBOSE: Using cached packaging-26.0-py3-none-any.whl (74 kB)
VERBOSE: Using cached pillow-12.1.1-cp312-cp312-win_amd64.whl (7.0 MB)
VERBOSE:
VERBOSE: Using cached pyparsing-3.3.2-py3-none-any.whl (122 kB)
VERBOSE: Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
VERBOSE:
VERBOSE: Using cached tzdata-2025.3-py2.py3-none-any.whl (348 kB)
VERBOSE:
VERBOSE: Using cached six-1.17.0-py2.py3-none-any.whl (11 kB)
VERBOSE:
VERBOSE: Installing collected packages: tzdata, six, pyparsing, pillow, packaging, numpy, kiwisolver, fonttools, cycler, python-dateutil, contourpy, pandas, matplotlib
VERBOSE: 
VERBOSE: Successfully installed contourpy-1.3.3 cycler-0.12.1 fonttools-4.61.1 kiwisolver-1.4.9 matplotlib-3.10.8 numpy-2.4.2 packaging-26.0 pandas-3.0.0 pillow-12.1.1 pyparsing-3.3.2 python-dateutil-2.9.0.post0 six-1.17.0 tzdata-2025.3
VERBOSE: Deleting sitecustomize directory C:\Users\NAME\AppData\Local\Temp\serious_python_sitecustomize764ed638
Creating app archive at C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\assets/python/app.zip from a temp directory
Writing app archive hash to C:\Users\NAME\OneDrive\Desktop\Projecter\PROJECT\spade\assets/python/app.zip.hash
Deleting temp directory

But when I then run the app, I dont have access to any of the install modules? I can also confirm this in the zip file, that it only makes a copy of my Python files.

Debug output from VScode:

Launching lib\main.dart on Windows in debug mode...
√ Built build\windows\x64\runner\Debug\spade.exe
Connecting to VM Service at ws://127.0.0.1:63669/YQhCUSKDQ74=/ws
Connected to the VM Service.
extractAssetOrFile directory: C:\Users\USER\AppData\Roaming\com.example\spade\flet\assets/python
Start unpacking archive: assets/python/app.zip
Finished unpacking application archive in 0:00:00.103068
PYTHON FAILURE: No module named 'pandas'
Looked in: ['C:\\Users\\USER\\AppData\\Roaming\\com.example\\spade\\flet\\assets\\__pypackages__', 'C:\\Users\\USER\\AppData\\Roaming\\com.example\\spade\\flet\\assets\\python', 'C:\\Users\\USER\\AppData\\Roaming\\com.example\\spade\\flet\\assets\\python\\__pypackages__', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug\\site-packages', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug\\DLLs', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug\\Lib', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug\\Lib\\site-packages', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug\\python312_d.zip', 'C:\\Users\\USER\\OneDrive\\Desktop\\Projecter\\PROJECT\\spade\\build\\windows\\x64\\runner\\Debug']
exePath: C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug\spade.exe
exeDir: C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug
appPath: C:\Users\USER\AppData\Roaming\com.example\spade\flet\assets/python\main.py
PYTHONPATH: C:\Users\USER\AppData\Roaming\com.example\spade\flet\assets/python;C:\Users\USER\AppData\Roaming\com.example\spade\flet\assets/python\__pypackages__;C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug\site-packages;C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug\DLLs;C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug\Lib;C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\spade\build\windows\x64\runner\Debug\Lib\site-packages
env_var: CSV_PATH=C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\example-data\test.csv
env_var: OUT_PATH=C:\Users\USER\OneDrive\Desktop\Projecter\PROJECT\example-data\analysis_result.png
sync: false
Application finished.

What am I doing wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions