我尝试运行 lightread,尝试写入“lightread”命令,但它显示了以下消息:
/home/quickly_trunk/lightread/__init__.py:40: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '3.0') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gio # pylint: disable=E0611
/home/quickly_trunk/lightread/LightreadWindow.py:44: PyGIWarning: Notify was imported without specifying a version first. Use gi.require_version('Notify', '0.7') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, WebKit, Notify, Soup # pylint: disable=E0611
/home/quickly_trunk/lightread/LightreadWindow.py:44: PyGIWarning: Soup was imported without specifying a version first. Use gi.require_version('Soup', '2.4') before import to ensure that the right version gets loaded.
from gi.repository import Gtk, Gdk, WebKit, Notify, Soup # pylint: disable=E0611
Traceback (most recent call last):
File "/home/quickly_trunk/bin/lightread", line 60, in <module>
import lightread
File "/home/lucifer/Downloads/quickly_trunk/lightread/__init__.py", line 42, in <module>
from lightread import LightreadWindow
File "/home/lucifer/Downloads/quickly_trunk/lightread/LightreadWindow.py", line 44, in <module>
from gi.repository import Gtk, Gdk, WebKit, Notify, Soup # pylint: disable=E0611
ImportError: cannot import name WebKit
我今天刚刚下载了 Ubuntu,不知道发生了什么。谢谢。
答案1
错误中已经提到了它- ImportError: cannot import name WebKit
。
要纠正它,请在终端中输入以下命令:
sudo apt-get update && sudo apt-get install python-webkit