Anki: improving memory

Non release banter
User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#1 by francois » 19 Oct 2023, 04:58

Trying to build PDF4QT, I fell on Anki which is a flashcard program which has the purpose to improve memory:
https://apps.ankiweb.net/
Anki is a program which makes remembering things easy. Because it's a lot more efficient than traditional study methods, you can either greatly decrease your time spent studying, or greatly increase the amount you learn.

Anyone who needs to remember things in their daily life can benefit from Anki. Since it is content-agnostic and supports images, audio, videos and scientific markup (via LaTeX), the possibilities are endless.
For example:

Learning a language
Studying for medical and law exams
Memorizing people's names and faces
Brushing up on geography
Mastering long poems
Even practicing guitar chords!


It works with qt5 and qt6. If you decide to install the program, please share your impressions.

Installation:

Code: Select all

getmod -m anki-2.1.51-x86_64-2salix15.0
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#2 by francois » 19 Oct 2023, 06:05

It seems there is a bug or I have to many installations of anki on my linux box:

Code: Select all

root@porteus:/home/guest/Downloads/anki-1.2.11/anki-1.2.11# anki
orjson is missing; DB operations will be slower
Traceback (most recent call last):
  File "/usr/lib64/python3.9/site-packages/aqt/qt/__init__.py", line 13, in <module>
    import PyQt6
ModuleNotFoundError: No module named 'PyQt6'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/bin/anki", line 5, in <module>
    from aqt import run
  File "/usr/lib64/python3.9/site-packages/aqt/__init__.py", line 45, in <module>
    from aqt import gui_hooks
  File "/usr/lib64/python3.9/site-packages/aqt/gui_hooks.py", line 11, in <module>
    from aqt.hooks_gen import *
  File "/usr/lib64/python3.9/site-packages/aqt/hooks_gen.py", line 18, in <module>
    from aqt.qt import QDialog, QEvent, QMenu, QModelIndex, QWidget, QMimeData
  File "/usr/lib64/python3.9/site-packages/aqt/qt/__init__.py", line 15, in <module>
    from .qt5 import *  # type: ignore
  File "/usr/lib64/python3.9/site-packages/aqt/qt/qt5.py", line 11, in <module>
    from PyQt5.QtCore import *  # type: ignore
ModuleNotFoundError: No module named 'PyQt5.sip'
root@porteus:/home/guest/Downloads/anki-1.2.11/anki-1.2.11# 
Any cue?
Prendre son temps, profiter de celui qui passe.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Anki: improving memory

Post#3 by beny » 19 Oct 2023, 12:49

slackware don't have this package, so the only way to follow is install it via pip,so you have to install the python-pip package or download the pyqt5-sip from the web site of python.
and anky can work with the two qt version 6 and 5,take a look at rich tread on forum: Anki - Flash Card program to help studying ;-)

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#4 by francois » 19 Oct 2023, 16:37

Hello beny,

Though I had PyQt5-5.15.2-x86_64-5, I have to install PyQt5 for python thru:

Code: Select all

pip install PyQt5
then six was missing, then
pip install six

Code: Select all

guest@porteus:~$ anki
orjson is missing; DB operations will be slower
Traceback (most recent call last):
  File "/usr/bin/anki", line 5, in <module>
    from aqt import run
  File "/usr/lib64/python3.9/site-packages/aqt/__init__.py", line 74, in <module>
    from aqt.main import AnkiQt  # isort:skip
  File "/usr/lib64/python3.9/site-packages/aqt/main.py", line 20, in <module>
    import aqt.mediasrv
  File "/usr/lib64/python3.9/site-packages/aqt/mediasrv.py", line 19, in <module>
    import flask_cors  # type: ignore
  File "/usr/lib64/python3.9/site-packages/flask_cors/__init__.py", line 11, in <module>
    from .decorator import cross_origin
  File "/usr/lib64/python3.9/site-packages/flask_cors/decorator.py", line 14, in <module>
    from .core import *
  File "/usr/lib64/python3.9/site-packages/flask_cors/core.py", line 19, in <module>
    from six import string_types
ModuleNotFoundError: No module named 'six'
guest@porteus:~$ easy_install six
bash: easy_install: command not found
guest@porteus:~$ pip install six
Defaulting to user installation because normal site-packages is not writeable
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six
Successfully installed six-1.16.0
guest@porteus:~$ anki
orjson is missing; DB operations will be slower
Preparing to run...
Qt fatal: Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2) 
Aborted
guest@porteus:~$ 
Qt fatal: Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2)
Prendre son temps, profiter de celui qui passe.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Anki: improving memory

Post#5 by beny » 19 Oct 2023, 17:20

in slackwaere you have the python-six and there is also the slackbuild of:

python3-orjson (Fast, correct Python JSON library)

orjson is a fast, correct JSON library for Python. It benchmarks as
the fastest Python library for JSON and is more correct than the
standard json library or other third-party libraries. It serializes
dataclass, datetime, numpy, and UUID instances natively.

anki work also in standalone mode, if you want no installation

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#6 by francois » 25 Oct 2023, 13:53

Where do I get the standalone version of anki?
Prendre son temps, profiter de celui qui passe.

beny
Full of knowledge
Full of knowledge
Posts: 2098
Joined: 02 Jan 2011, 11:33
Location: italy

Anki: improving memory

Post#7 by beny » 25 Oct 2023, 14:43

https://apps.ankiweb.net/ there are two version qt5 or qt6 but you have the the bin inside the directory so you can start in standalone mode try it

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#8 by francois » 26 Oct 2023, 01:26

Thanks beny. I will explore anki. This seems a very good memory exerciser. It is based on the Art of memory,
the principle comes from ancient greek and romans.
Method of loci
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Anki: improving memory

Post#9 by Rava » 03 Nov 2023, 06:37

Can someone give an easy HOWTO set up anki so that it works on any Porteus 5.01 x86-64 system?

Or just upload the module and share it via x86_64 xzm modules ?
Cheers!
Yours Rava

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#10 by francois » 03 Nov 2023, 21:02

HOWTO for anki as proposed by beny:
download anki qt5 version:
https://apps.ankiweb.net/
extract /home/guest/Downloads/anki-23.10-linux-qt5.tar.zst
cd /home/guest/Downloads/detruire/anki-23.10-linux-qt5/
double click on anki which is the exec file of the program. That should do it.

From what I understand, anki executable seems the only file needed, at least for now.
You can set the anki software file wherever you want, in the /opt if you want.
Within the files provided there is a anki.destop file. Modify it according to the place you installed the anki software. And copy it in the /usr/share/applications/. You can use that .destop file to start anki.
Prendre son temps, profiter de celui qui passe.

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#11 by francois » 03 Nov 2023, 21:04

If you set it up in english it seems to work fine. The setup for french seems to be buggy.
Prendre son temps, profiter de celui qui passe.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Anki: improving memory

Post#12 by Rava » 04 Nov 2023, 04:59

beny wrote:
25 Oct 2023, 14:43
https://apps.ankiweb.net/ there are two version qt5 or qt6 but you have the the bin inside the directory so you can start in standalone mode try it
francois wrote:
03 Nov 2023, 21:02
HOWTO for anki as proposed by beny:
download anki qt5 version:
https://apps.ankiweb.net/
extract /home/guest/Downloads/anki-23.10-linux-qt5.tar.zst
cd /home/guest/Downloads/detruire/anki-23.10-linux-qt5/
double click on anki which is the exec file of the program. That should do it.
Does downloading the anki-23.10-linux-qt5.tar.zst and extracting the binary mean I do not need any qt5 dependencies for the binary only to be able to run in my P5.01 XFCE?

I doubt that this would work, but I can still try it. :D

Added in 8 minutes 18 seconds:
BTW, here are wikipedia articles on Anki for those interested:

English Anki (software)
Deutsch Anki
Français Anki
Italiano Anki
Español Anki

all in all there are 24 language versions of the wikipedia article. :happy62:

Only a small quote from Anki (software)
Anki is content-agnostic, the cards are presented using HTML and may include text, images, sounds, videos, and LaTeX equations. The decks of cards, along with the user's statistics, are stored in the open SQLite format.

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Anki: improving memory

Post#13 by Rava » 04 Nov 2023, 05:58

Rava wrote:
04 Nov 2023, 05:08
I doubt that this would work, but I can still try it. :D
Sometimes the best result is when one is proven wrong: It works indeed. It complains a bit

Code: Select all

guest@rava:/8/tmp/anki-23.10-linux-qt5$ ./anki 
Anki starting...
Initial setup...
Preparing to run...
Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 511, resource id: 14205749, major code: 40 (TranslateCoords), minor code: 0 
Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 658, resource id: 14207410, major code: 40 (TranslateCoords), minor code: 0 
Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 788, resource id: 14208089, major code: 40 (TranslateCoords), minor code: 0 
Starting main loop...
Qt warning: QXcbConnection: XCB error: 3 (BadWindow), sequence: 912, resource id: 14208764, major code: 40 (TranslateCoords), minor code: 0 
but it runs just fine. :) (But I have just started it "empty" since I lack any data files for it.)

Now the main question: where does one find the files to feed it with?
E.g. for a dum dum like me learning Italian?
Cheers!
Yours Rava

User avatar
Rava
Contributor
Contributor
Posts: 5416
Joined: 11 Jan 2011, 02:46
Distribution: XFCE 5.01 x86_64 + 4.0 i586
Location: Forests of Germany

Anki: improving memory

Post#14 by Rava » 04 Nov 2023, 06:09

francois wrote:
03 Nov 2023, 21:02
From what I understand, anki executable seems the only file needed, at least for now.
Not really.
When I started the anki executable via

Code: Select all

./anki
from the complete extracted folder as quoted above, it starts and seems to seemingly work.
Then I only copied the anki executable into a new empty folder and tried

Code: Select all

./anki
once more:

Code: Select all

guest@rava:/8/tmp/TEST$ ls -oa
total 81884
drwxr-xr-x 2 guest     4096 2023-11-04 07:04 .
drwxr-xr-x 6 guest     4096 2023-11-04 07:04 ..
-rwxr-xr-x 1 guest 83754768 2023-10-31 23:03 anki
guest@rava:/8/tmp/TEST$ ./anki 
Anki starting...
Initial setup...
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "aqt", line 40, in <module>
  File "anki.lang", line 12, in <module>
  File "anki._backend", line 14, in <module>
ImportError: /mnt/sda8/tmp/TEST/lib/anki/_rsbridge.so: cannot open shared object file: No such file or directory
guest@rava:/8/tmp/TEST$ echo $?
1
Cheers!
Yours Rava

User avatar
francois
Contributor
Contributor
Posts: 6435
Joined: 28 Dec 2010, 14:25
Distribution: xfce plank porteus nemesis
Location: Le printemps, le printemps, le printemps... ... l'hiver s'essoufle.

Anki: improving memory

Post#15 by francois » 04 Nov 2023, 07:47

I get this now that I have installed it:

Code: Select all

Qt fatal: Cannot mix incompatible Qt library (5.15.3) with this library (5.15.2) 
So in your case, you should work with the whole set of files.
Prendre son temps, profiter de celui qui passe.

Post Reply