Prerequisites
Before you begin, make sure you have the following installed: Windows
No additional system requirements. Python packages will handle everything.
Linux (X11)
Make sure you’re running X11 (not Wayland). Meikipop uses X11-specific APIs for keyboard monitoring.You’ll also need development headers:
macOS
You’ll need to grant permissions for meikipop to work:
- Open System Preferences → Security & Privacy → Privacy
- Add your terminal app (Terminal.app, iTerm2, etc.) to:
- Input Monitoring
- Screen Recording
- Accessibility
Clone the repository
Get the latest source code from GitHub:Set up virtual environment (recommended)
Using a virtual environment keeps your dependencies isolated:(venv) in your terminal prompt when the environment is active.
Install dependencies
Install all required Python packages fromrequirements.txt:
Understanding the dependencies
Here are the key dependencies (fromrequirements.txt):
Platform-specific dependencies are automatically installed only on the relevant operating system.
Build the dictionary
Meikipop requires a preprocessed dictionary file for fast lookups. You have two options:Option 1: Download prebuilt dictionary (faster)
Downloadjmdict_enhanced.pkl from the latest release:
Option 2: Build from source (requires lxml)
Build the dictionary yourself:Verify your setup
Ensure everything is configured correctly:meikipop/
├── data/
│ └── jmdict_enhanced.pkl # Dictionary file (required)
├── src/
│ ├── main.py # Entry point
│ ├── config/
│ ├── dictionary/
│ ├── gui/
│ ├── ocr/
│ ├── screenshot/
│ └── utils/
├── requirements.txt
└── config.ini # Created on first run
--------------------------------------------------
meikipop.0.x.x is running in the background.
- To use: Press and hold 'shift' over Japanese text.
- To configure or change scan area: Right-click the icon in your system tray.
- Make sure to checkout the auto scan mode!
- To exit: Press Ctrl+C in this terminal.
--------------------------------------------------
Development workflow
Running from source
Always run meikipop as a module:Configuration file
Settings are stored inconfig.ini in the project root:
Logging
Meikipop outputs debug information to the console. To see more detailed logs, modifysrc/utils/logger.py.
Code style
The codebase generally follows PEP 8. Key conventions:- Snake_case for functions and variables
- PascalCase for classes
- Module-level constants in UPPER_CASE
- Descriptive variable names (e.g.,
hit_scan_resultnothsr)
Troubleshooting
ImportError: No module named 'src'
ImportError: No module named 'src'
You’re running the script incorrectly. Always use:Not:
ModuleNotFoundError: No module named 'PyQt6'
ModuleNotFoundError: No module named 'PyQt6'
Dependencies aren’t installed. Run:
RuntimeError: Failed to load dictionary
RuntimeError: Failed to load dictionary
The
jmdict_enhanced.pkl file is missing from the data/ directory. See Build the dictionary section.Linux: Could not connect to X server
Linux: Could not connect to X server
You’re either:
- Not running X11 (check with
echo $XDG_SESSION_TYPE) - Missing the DISPLAY environment variable
- Running without a graphical session
macOS: Keyboard hotkey not working
macOS: Keyboard hotkey not working
Make sure you’ve granted Input Monitoring permissions to your terminal app in System Preferences → Security & Privacy → Privacy → Input Monitoring.You may need to restart the terminal after granting permissions.
Windows: The 'keyboard' library failed to import
Windows: The 'keyboard' library failed to import
On Windows, the keyboard library sometimes requires administrator privileges. Try running your terminal as administrator.
Next steps
Now that your environment is set up, you can:- Learn about the architecture to understand how meikipop works
- Build executables with PyInstaller
- Start contributing by fixing bugs or adding features