升级至 19.04 版后 EOG(图像查看器)崩溃

升级至 19.04 版后 EOG(图像查看器)崩溃

我刚刚升级到 19.04,现在 EOG 无法工作,无论是通过 Nautilus 还是命令行。当我通过命令行打开它时,我得到

Failed to import the site module
Traceback (most recent call last):
  File "/usr/lib/python3.7/site.py", line 603, in <module>
    main()
  File "/usr/lib/python3.7/site.py", line 589, in main
    known_paths = addusersitepackages(known_paths)
  File "/usr/lib/python3.7/site.py", line 321, in addusersitepackages
    addsitedir(user_site, known_paths)
  File "/usr/lib/python3.7/site.py", line 213, in addsitedir
    addpackage(sitedir, name, known_paths)
  File "/usr/lib/python3.7/site.py", line 165, in addpackage
    f = open(fullname, "r")
  File "/usr/lib/python3.7/_bootlocale.py", line 35, in getpreferredencoding
    if sys.flags.utf8_mode:
AttributeError: 'sys.flags' object has no attribute 'utf8_mode'

因此,我假设存在 python 错误:

Python 3.7.3 (default, Apr  3 2019, 05:39:12) 
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.flags.utf8_mode
0

我注意到的一件事是,python现在指向python2而不是python3(就像我运行 18.10 时一样)。我认为这可能是问题的根源,因为在 python2.7 中sys.flags没有utf8_mode

我将其改为/usr/bin/python指向python3,但是没有作用;当我尝试启动时出现了与上述相同的错误eog

有人知道这里发生了什么事吗?

相关内容