You might see that the Dropbox Community team have been busy working on some major updates to the Community itself! So, here is some info on what’s changed, what’s staying the same and what you can expect from the Dropbox Community overall.

Forum Discussion

mraureliusr's avatar
mraureliusr
New member | Level 2
8 years ago

'dropbox is not a package'

So I'm trying to get started with backup-and-restore.py. I've run pip3 install --user dropbox, and the output of find /usr -name dropbox is 

$ find /usr -name dropbox
/usr/lib/python2.7/site-packages/dropbox
/usr/lib/python3.6/site-packages/dropbox

 

So it's definitely installed. However, running the file leads to 

Traceback (most recent call last):
File "dropbox.py", line 4, in <module>
import dropbox
File "/home/amr/Downloads/dropbox.py", line 5, in <module>
from dropbox.files import WriteMode
ModuleNotFoundError: No module named 'dropbox.files'; 'dropbox' is not a package

 

I also went into a python console and did

import sys

print(sys.path)

['', '/usr/lib64/python36.zip', '/usr/lib64/python3.6', '/usr/lib64/python3.6/lib-dynload', '/home/amr/.local/lib/python3.6/site-packages', '/usr/lib64/python3.6/site-packages', '/usr/lib/python3.6/site-packages']

 

So it should definitely be finding it. Has anyone else had this error or can offer any advice? I was hoping to get this up and running quickly and not be falling at the first hurdle.

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Staff rankDropbox Staff
    It looks like you've named your own file "dropbox.py", which is confusing the Python import. Try renaming it to something else instead. (Also, be sure to delete any dropbox.pyc of your own left over.)