Search code examples
pythontracebackfedora20anki

Fedora 20 Anki fails with ImportError


I want to install Anki on my Fedora installation, so I did:

sudo yum install anki

The installing process went fine, but when I try to run Anki the following exception pops up:

Traceback (most recent call last):
File "/usr/bin/anki", line 5, in <module>
import aqt File "/usr/share/anki/aqt/__init__.py", line 32
except ImportError, e:</module>

Anyone knows how to fix this?


Solution

  • Okay folks, I've got it myself. The clue was in the last step of this bug report.

    For Fedora you need to go into the folder where Anki is installed, then open the runanki.txt file and change the first line:

    From:

    #!/usr/bin/env python
    

    To:

    #!/usr/bin/env python2.7
    

    Now it works!