blob: 3cf53ec2872d5659cf14767c568e22cc618c984c (
plain)
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
28
29
|
#+TITLE: * TODO [#B] Install ~python-genanki~ system-wide :install:py
#+SOURCE: from health
#+DATE: 2026-05-29 11:11:48 -0500
* TODO [#B] Install ~python-genanki~ system-wide :install:python:
Add ~genanki~ to the Python package set so projects can generate Anki ~.apkg~ decks from org-drill files without per-project venvs.
** Why
A converter script in the health project (~health-drill-to-anki.py~) emits an Anki package from an org-drill source file — same workflow as ~/sync/org/drill/~ but pushed into Anki for mobile review. The script is ~100 lines and runs anywhere Python has ~genanki~ available. The pattern is likely to spread: deepsat already has a drill file, more will follow.
Right now Arch's PEP 668 enforcement blocks ~pip install --user genanki~, so the script needs a throwaway venv to run. Solving once at the system level removes that friction across every project.
** Install options (pick one)
- *Arch official repo or AUR.* ~pacman -S python-genanki~ if it's in extra/community, or ~yay -S python-genanki~ from AUR. Cleanest. Auto-updates with the rest of the system.
- *pipx.* ~pipx install genanki~ — but genanki is a library, not a CLI app, so pipx is a stretch. Skip.
- *System-wide pip with ~--break-system-packages~.* Works but circumvents PEP 668. Last resort.
Recommendation: try pacman/AUR first, fall back to a managed venv at a known path (e.g. ~/opt/python-tools/~) that scripts can shebang into.
** Verification
After install:
#+begin_src bash
python3 -c "import genanki; print(genanki.__version__)"
#+end_src
Should print a version like ~0.13.1~ without traceback.
** Cross-reference
- A companion message went to rulesets' inbox proposing the export script as a template script under ~claude-templates/.ai/scripts/~. That decision depends on this install landing first — without ~genanki~ available system-wide, the template script can't run out of the box.
|