ModuleNotFoundError: 'gi'라는 모듈이 없습니다.

ModuleNotFoundError: 'gi'라는 모듈이 없습니다.

Dropbox를 시작하려고 하면 메시지가 나타납니다.

$ dropbox start
Starting Dropbox...
The Dropbox daemon is not installed!
Run "dropbox start -i" to install the daemon

지침에 따라,

$ 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'

그런 다음 gi를 설치하려고했습니다.

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

버전:

$ lsb_release  -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco

답변1

루트 환경을 포함하여 conda 환경이 활성화되어 있지 않은지 확인하고 "sudo dropbox start -i"로 실행하십시오.

답변2

이 모듈을 로드하지 않으려면 GTK 인터페이스를 건너뛸 수 있습니다 gi. 보관용 계정 스크립트를 실행합니다.

$ DISPLAY='' dropbox start -i

그러면 GTK 창 대신 콘솔에 메시지가 표시됩니다.

관련 정보