ModuleNotFoundError: 没有名为“gi”的模块

Abs*_*cDo 4 dropbox

在尝试启动 dropbox 时,它提示

$ dropbox start
Starting Dropbox...
The Dropbox daemon is not installed!
Run "dropbox start -i" to install the daemon
Run Code Online (Sandbox Code Playgroud)

按照指示,

$ dropbox start -i
Starting Dropbox...Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1443, in start
    download()
  File "/usr/bin/dropbox", line 294, in download
    import gi
ModuleNotFoundError: No module named 'gi'
Run Code Online (Sandbox Code Playgroud)

然后尝试安装gi

$ pip install gi
Collecting gi
  Could not find a version that satisfies the requirement gi (from versions: )
No matching distribution found for gi
Run Code Online (Sandbox Code Playgroud)

版本:

$ lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco
Run Code Online (Sandbox Code Playgroud)

小智 6

您可以跳过 GTK 界面,这将避免加载此gi模块。运行保管箱脚本:

$ DISPLAY='' dropbox start -i
Run Code Online (Sandbox Code Playgroud)

您将在控制台而不是 GTK 窗口中收到消息。


And*_*ner 5

确保您没有启用 conda 环境,包括 root 环境,并将其作为“sudo dropbox start -i”运行