Flet desktop-app to extract Japanese reading with SudachiPy .
-
Install SudachiPy, SudachiDict-core, PyInstaller:
pip install sudachipy sudachidict_core pyinstaller
-
Remove pathlib module for pyinstaller compatibility:
python -m pip uninstall pathlib
-
Run:
pyinstaller --onefile --name yomi --collect-data sudachidict_core --collect-data sudachipy --noconsole main.py
-
Re-install pathlib:
python -m pip install pathlib
When running a build using pyinstaller installed with pip install pyinstaller
, the generated .exe
file may be considered a virus by Windows Defender.
In this case, using a locally built pyinstaller may solve the problem.
Steps:
git clone https://github.com/pyinstaller/pyinstaller
cd .\pyinstaller\bootloader\
python .\waf all
- Visual Studio C++ compiler is required for build.
- It can be installed with Scoop :
scoop install vcredist2015
.
- It can be installed with Scoop :
- In my environment, 2015 and 2022 were installed. If just installing vcredist2015 results in error, try installing the latest version as well.
- Visual Studio C++ compiler is required for build.
cd ..
(move topyinstaller
directory)pip install .
This will build pyinstaller in the python site-package folder. The folder used for the build is no longer used, so you can delete it.
Sudachi and SudachiDict are both licensed under the Apache License, Version2.0 .