From Gentoo Wiki
Jump to:navigation Jump to:search
This article is a stub. Please help out by expanding it (how to get started).

Anki is a multi-platform memory training program written in Python that uses the science of spaced repetition to expedite the learning process and enhance recall. Anki is available on Microsoft Windows, macOS, Linux, FreeBSD; Android and iOS.


Installation Using Emerge

USE flags

USE flags for app-misc/anki A spaced-repetition memory training program (flash cards)

test Enable dependencies and/or preparations necessary to run tests (usually controlled by FEATURES=test but can be toggled independently)


To install:

root #emerge --ask app-misc/anki

To uninstall:

root #emerge --ask --depclean --verbose app-misc/anki

Environment variables

  • ANKIDEV If set, additional logging messages will be printed to standard output and automatic backups will be disabled.
  • TRACESQL If set, SQL statements will be printed at execution time.
  • LOGTERM If set, messages bound for collection2.log will also be printed to standard output.
  • ANKI_PROFILE_CODE If set, Python profiling data will be sent to standard output upon exit.


  • $XDG_DATA_HOME/Anki2 - the local per-user configuration file from Anki 2.0 onward.
  • ~/Anki - The local per-user configuration file for Anki 1.x.

Installation Using Flatpak

user $flatpak install flathub net.ankiweb.Anki
user $flatpak run net.ankiweb.Anki

Config Files

The config files (and plugins, database, etc) will reside in:

  • ~/.var/app/net.ankiweb.Anki/

Installation Using Python Wheel

Anki's beta version can be installed on both x86_64 and ARM systems using pip rather easily. Please advise Anki's documentation to do this.



user $anki --help
usage: anki [OPTIONS] [file to import]

Anki 2.1.15

optional arguments:
  -h, --help            show this help message and exit
  -b BASE, --base BASE  path to base folder
  -p PROFILE, --profile PROFILE
                        profile name to load
  -l LANG, --lang LANG  interface language (en, de, etc)


Using Anki is straightforward but emerging Anki occasionally runs into issues.

Attempting to emerge Anki fails due to lack of available RAM

Anki has dev-python/PyQtWebEngine as a dependency, which requires ≥48GB of available RAM in order to compile. This figure can be satisfied with a swap partition if needed, not just physical RAM. If emerge fails to build app-misc/anki ensure that you have either enough physical RAM or a large enough swap partition to continue.

Anki Takes Many Hours to Build

In addition to its eye watering RAM requirements dev-python/PyQtWebEngine can take a long time to build. On a high core count system this dependency can be built in a reasonable amount of time, perhaps taking a few hours. On a budget quad core, building Anki can take the better part of a day.

Some Anki users with low spec systems have taken to emerging app-misc/anki once and then version pinning it and only upgrading it sporadically. Obviously, this is not an ideal solution due to the security considerations inherent in such a decision.