cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
What’s new: end-to-end encryption, Replay and Dash updates. Find out more about these updates, new features and more here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

'dropbox is not a package'

'dropbox is not a package'

mraureliusr
New member | Level 2

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.

1 Reply 1

Greg-DB
Dropbox 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.)
Need more support?
Who's talking

Top contributors to this post

  • User avatar
    Greg-DB Dropbox Staff
What do Dropbox user levels mean?