0

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?

Stefan van den Akker
  • 6,661
  • 7
  • 48
  • 63
  • Please post the full error traceback! – Klaus D. Dec 15 '14 at 11:10
  • edit: it may have to do with some python libraries like simplejson, beautifulsoup or sqlalchemy. I tried to remove them and reinstall anki, it didnt help. Also this error occurs on any anki version i tried to run. The same thing seems happening on archlinux in a slightly different form; their solution was to remove the python libraries and reinstall it (as i did) and then change the line in /usr/share/anki >#!/usr/bin/env python to #!/usr/bin/env python2.7 here is the link to the archlinux problem: https://bugs.archlinux.org/task/37449 I did not understand the last step.. – vl_stackoverflow Dec 15 '14 at 11:10
  • @KlausD. this is all what i get in terminal. If there is a way to see more, please tell me how – vl_stackoverflow Dec 15 '14 at 11:15
  • Which version of Python? That error syntax (`except Error, name: `) is invalid in 3.x (in favour of `except Error as name:`). – jonrsharpe Dec 15 '14 at 11:19
  • @jonrsharpe Python 3.4.1 :: Anaconda 2.0.1 (64-bit) – vl_stackoverflow Dec 15 '14 at 11:37

1 Answers1

0

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!

Stefan van den Akker
  • 6,661
  • 7
  • 48
  • 63