简体   繁体   English

在Ubuntu 14.10上安装Anki的问题

[英]Issue with installing anki on Ubuntu 14.10

I installed anki on my Ubuntu 14.10 machine with no errors (using dpkg -i ). 我在Ubuntu 14.10计算机上安装了anki,没有错误(使用dpkg -i )。 When I run it as a normal user I get following error. 当我以普通用户身份运行它时,出现以下错误。

~/software$ anki
Traceback (most recent call last):
  File "/usr/bin/anki", line 5, in <module>
    import aqt
  File "/usr/share/anki/aqt/__init__.py", line 6, in <module>
    import optparse
  File "/opt/epd/lib/python2.7/optparse.py", line 418, in <module>
    _builtin_cvt = { "int" : (_parse_int, _("integer")),
  File "/opt/epd/lib/python2.7/gettext.py", line 566, in gettext
    return dgettext(_current_domain, message)
  File "/opt/epd/lib/python2.7/gettext.py", line 530, in dgettext
    codeset=_localecodesets.get(domain))
  File "/opt/epd/lib/python2.7/gettext.py", line 465, in translation
    mofiles = find(domain, localedir, languages, all=1)
  File "/opt/epd/lib/python2.7/gettext.py", line 428, in find
    val = os.environ.get(envar)
AttributeError: 'module' object has no attribute 'environ'

However, when I run it as root (using sudo ) it works fine with no errors. 但是,当我以root身份运行它(使用sudo )时,它运行正常,没有错误。 I would prefer to not run it as root. 我宁愿不要以root身份运行它。 How can I go about diagnosing this? 我该如何诊断?

The error message indicates that you're loading a module called os that doesn't contain environ. 错误消息表明您正在加载名为os的模块,其中包含环境。

This shouldn't be the case if you are loading the usual os module. 如果要加载常规的os模块,则情况并非如此。

Check where this faulty os module is coming from. 检查此故障os模块的来源。

You may try running anki with python -v and inspect the output 您可以尝试使用python -v运行anki并检查输出

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM