1

Upon starting dropbox , it prompt to install the daemon

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

When install the daemon, it prompts

$ 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

Consult with python - ImportError: No module named gi.repository - Stack Overflow

installed pygobject , but it still report error

$ dropbox start -i
Starting Dropbox...Traceback (most recent call last):
  File "/usr/bin/dropbox", line 1443, in start
    download()
  File "/usr/bin/dropbox", line 295, in download
    gi.require_version('Gdk', '3.0')
  File "/home/me/anaconda3/lib/python3.7/site-packages/gi/__init__.py", line 130, in require_version
    raise ValueError('Namespace %s not available' % namespace)
ValueError: Namespace Gdk not available
me@alpha:~:

and the python path

$ echo $PYTHONPATH
/home/me/anaconda3/lib/python3.7/site-packages\

What's the problem?

$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 19.04
Release:        19.04
Codename:       disco
AbstProcDo
  • 19,953
  • 19
  • 81
  • 138
  • You need to check if you have GTK installed. The bindings seem to be reporting that the library isn't there and as GDK is packaged with GTK it is highly likely that it is missing. Did you setup this machine with a DE that does not include GTK? – Dan D. Jun 30 '19 at 08:49
  • pygobject is not GTK of python? @DanD. – AbstProcDo Jun 30 '19 at 08:52
  • No, pygobject is just the Python binding. it only permits Python to call the GTK library that should be installed on the system. Did you setup the machine with KDE? You will need to use apt to install the required libraries. – Dan D. Jun 30 '19 at 09:03
  • No, I use gonme 3 @DanD. cannot pip install gtk, or sudo apt install gtk – AbstProcDo Jun 30 '19 at 09:06

2 Answers2

1

The packages you're looking for are the GObject Introspection bindings for GDK, namely python3-gi, which you already installed and provides Python access to installed bindings, and gir1.2-gdkpixbuf-2.0, which you're missing and provides bindings for Gdk. So most likely this will fix your issue:

sudo apt install gir1.2-gdkpixbuf-2.0

That said, a few remarks about your environment:

  • How did you install Dropbox? If it was via pip, apt or a downloaded .deb, all dependencies should automatically be installed for you. It should also take care of automatically starting any required daemons. That's why such packaging systems exist. As an end-user you're not supposed to deal with this. Are you installing from source? Why? Use the repositories!

  • Why are you using Anaconda? You're on Ubuntu, not Windows. Python is pre-installed, system-wide, ready to use out of the box. You don't need a self-contained, bloated and non-standard environment like Anaconda. Just use apt or pip!

MestreLion
  • 12,698
  • 8
  • 66
  • 57
1

You can skip the GTK interface which will avoid loading these gi module. Run the dropbox script:

$ DISPLAY='' dropbox start -i

And you will get the messages in your console.

marcaurele
  • 502
  • 1
  • 6
  • 14