首页 > 解决方案 > Autokey 不会在 Fedora 29 上启动

问题描述

我一直在尝试让自动密钥在全新安装的 Fedora 29 上工作。每次尝试启动应用程序时都会遇到错误,并且进程会终止。

encountered an uncaught pkg_resources.DistributionNotFound

标签: kdeautokeyfedora-29

解决方案


问题是 Fedora 29 默认使用 python3。安装 autokey-gtk 和 autokey-common 时,会拉取以下依赖项:

===================================================================================================================================================================================================================
 Package                                                Arch                                          Version                                                 Repository                                      Size
===================================================================================================================================================================================================================
Removing:
 autokey-gtk                                            noarch                                        0.95.2-1.fc29                                           @fedora                                        376 k
Removing unused dependencies:
 autokey-common                                         noarch                                        0.95.2-1.fc29                                           @fedora                                        554 k
 gtksourceview2                                         x86_64                                        2.11.2-27.fc29                                          @fedora                                        3.4 M
 pygtksourceview                                        x86_64                                        2.10.1-18.fc29                                          @fedora                                        196 k
 python3-xlib                                           noarch                                        0.23-3.fc29                                             @fedora                                        881 k
 wmctrl                                                 x86_64                                        1.07-25.fc29                                            @fedora                                         67 k

gtksourceview 适用于 python2 而不是 python3,它在尝试启动时不允许自动键打开窗口。您需要单独安装 gtksourceview3 以在 python3 中为 autokey-gtk 提供正确的库。

# sudo dnf install gtksourceview3 -y

推荐阅读