-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild_standalone_executable.txt
27 lines (19 loc) · 1.08 KB
/
build_standalone_executable.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
Steps: (This is now handled by a GitHub action, but this is how we did it manually before setting up that action.)
**Skip to step 2 if you've done step 1 once in the past
1. Create clean virtualenv (this avoids some problem with pathlib):
cd to home (e.g., C:\Users\pexat or /home/pexat)
conda create -n clean_env python=3.12
2. Activate environment
conda activate clean_env
** skip to step 4 if you've already done this in the environment
3. Install pyinstaller and dependencies
pip install pyinstaller openpyxl tabulate
4. cd to repo root directory
5. pyinstaller --onefile aggie_unterprise/aggie_report.py --distpath dist_win
(or --distpath dist_linux or --distpath dist_mac)
or if that doesn't work:
pyinstaller --onefile --hidden-import=openpyxl --hidden-import=tabulate scripts/aggie_report.py --distpath dist_win
This creates the file aggie-report.exe in dist_win.
6. Open WSL and cd to repo root.
7. conda activate clean_env (assuming you've created the clean_env virtual environment in WSL as with Windows above)
8. pyinstaller --onefile aggie_unterprise/aggie_report.py --distpath dist_linux