anki will not start in ubuntu 18.04

Asked by Dieter Fedra

I am a newbee in Ubuntu and experience the following problem while installing
on Ubuntu 18.04 (with latest updates) (PC = Sony Vaio with x86-64)
the program anki-2.0.52

Following the given instructions I was able to install the ANKI programm
but clicking on the icon does not start the program

starting the program from a terminal returns the following messages:
===============================
dieter@dieter-ubuntu:~$ anki
Traceback (most recent call last):
  File "/usr/bin/anki", line 6, in <module>
    import aqt
  File "/usr/share/anki/aqt/__init__.py", line 4, in <module>
    from anki import version as _version
  File "/usr/share/anki/anki/__init__.py", line 14, in <module>
    from anki.storage import Collection
  File "/usr/share/anki/anki/storage.py", line 11, in <module>
    from anki.collection import _Collection
  File "/usr/share/anki/anki/collection.py", line 25, in <module>
    from anki.sound import stripSounds
  File "/usr/share/anki/anki/sound.py", line 87, in <module>
    from anki.mpv import MPV, MPVBase
  File "/usr/share/anki/anki/mpv.py", line 39, in <module>
    from distutils.spawn import find_executable
ModuleNotFoundError: No module named 'distutils.spawn'
======================================================

what is wrong, what must I do?
(Sorry if this is not the correct forum for these kind of problems- please advise)

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
Dieter Fedra
Solved:
Last query:
Last reply:
Revision history for this message
Hans Joachim Desserud (hjd) said :
#1

You have run into bug 1762593. Anki expects that the package python3-distutils, but didn't specify it as a dependency. A fix seems to be on the way, in the mean time you can work around this by manually installing python3-distutils.

Revision history for this message
Hans Joachim Desserud (hjd) said :
#2

"Anki expects that the package python3-distutils..." is installed and available since it uses some parts of it.

Revision history for this message
Dieter Fedra (dfedra) said :
#3

Thank you very much for this answer!
Meanwhile I also find the command to install the missing package on my PC
it is:

            sudo apt-get install python3-distutils

after that Anki runs fine on my system!

Revision history for this message
Dieter Fedra (dfedra) said :
#4

Dear Jeremy

Meanwhile I found the solution for my problem :-)
After doing

               $ sudo apt-get install python3-distutils

in a terminal window, anki is running fine!

many thanks - dieter

Am 06.10.2018 15:22 schrieb Jeremy Bicha:
> Bug #1762593 status changed in anki in Ubuntu Bionic:
>
> New => In Progress
>
> https://bugs.launchpad.net/ubuntu/bionic/+source/anki/+bug/1762593
> "anki crashed with ModuleNotFoundError in /usr/share/anki/anki/mpv.py:
> No module named 'distutils.spawn'"
>
> This bug is linked to #674550.
> anki will not start in ubuntu 18.04
> https://answers.launchpad.net/ubuntu/+question/674550