I’ve been trying to get Anki working on an ARM-based Jetson Nano running NVIDIA’s Linux4Tegra 32.6.1, which is built on Ubuntu 18.04.
I cloned ankitects/anki at commit a765ab95ec128cb8e46579509f73350c513e3232 and tried building wheels both ways, with ./scripts/build
and scripts/docker/build.sh arm64
using both Python 3.10 and Python 3.9. Both methods succeed and produce two wheels, named as follows:
anki-2.1.49-cp39-abi3-manylinux_2_31_aarch64.whl
aqt-2.1.49-py3-none-any.whl
Unfortunately pip install anki-2.1.49-cp39-abi3-manylinux_2_31_aarch64.whl aqt-2.1.49-py3-none-any.wh
or just pip install anki-2.1.49-cp39-abi3-manylinux_2_31_aarch64.whl
fails with:
`ERROR: anki-2.1.49-cp39-abi3-manylinux_2_31_aarch64.whl is not a supported wheel on this platform.
I don’t understand why the wheel I built on directly this platform wouldn’t be supported by the platform it was built on. This is my main question.
Before trying pip install
, I did upgrade pip
to the latest and have verified that it’s using Python 3.9:
$ pip --version
pip 21.3.1 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
aqt-2.1.49-py3-none-any.whl
seems to depend upon the anki
package, s it refuses to install with:
ERROR: Could not find a version that satisfies the requirement anki==2.1.49 (from aqt) (from versions: 2.1.24+359b9f5c, 2.1.25, 2.1.26, 2.1.28, 2.1.29, 2.1.30, 2.1.31, 2.1.32, 2.1.33, 2.1.34, 2.1.35)
ERROR: No matching distribution found for anki==2.1.49
Interestingly, I am able to install aqt
directly from PyPI with pip install aqt
, but import aqt
fails with ModuleNotFoundError: No module named 'anki'
.
Perhaps it’s also worth mentioning as an aside that there is actually an anki
package (version 2.1.0+dfsg~b36-1) available via apt
from the repository http://ports.ubuntu.com/ubuntu-ports bionic/universe arm64
, but it is an out-of-date beta, which displays the following message on stdout
whenever run:
This is an BETA build - please do not package it up for Linux distributions
Well apparently someone disregarded that. But whatever. I would be happy to use it if only it worked, but although it does run, it fails to open any of my decks with the following error message:
Anki was unable to open your collection file. If problems persist after restarting your computer, please use the Open Backup button in the profile manager:
Debug info:
Traceback (most recent call last):
File "/usr/share/anki/aqt/main.py", line 324 in loadCollection,
return self._loadCollection()
File "/usr/share/anki/aqt/main.py", line 348 in _loadCollection,
self.col = Collection(cpath, log=True)
File "/usr/share/anki/anki/storage.py", line 40 in Collection,
Collection col = _Collection(db, server, log)
File "/usr/share/anki/anki/collection.py", line 67 in __init__
self.load()
File "/usr/share/anki/anki/collection.py", line 143 in load
self.conf = json.loads(self.conf)
File "/usr/lib/python3.6/json/__init__.py", line 354 in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.6/json/decoder.py", line 339 in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.6/json/decoder.py", line 357 in raw_decode
raise JSONDecodeError(""Execting value"", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
Various forum posts which reference this issue, such as this one, state that the solution is to upgrade. Since there is no more recent version available in the repositories, that’s why I’m trying to build my own.
Thanks in advance for any help.