Need to see if your shared folder is taking up space on your dropbox 👨‍💻? Find out how to check here.

Forum Discussion

mraureliusr's avatar
mraureliusr
New member | Level 2
9 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.

1 Reply

  • Greg-DB's avatar
    Greg-DB
    Icon for Dropbox Community Moderator rankDropbox Community Moderator
    9 years ago
    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.)

About Dropbox API Support & Feedback

Node avatar for Dropbox API Support & Feedback
Find help with the Dropbox API from other developers.

The Dropbox Community team is active from Monday to Friday. We try to respond to you as soon as we can, usually within 2 hours.

If you need more help you can view your support options (expected response time for an email or ticket is 24 hours), or contact us on X, Facebook or Instagram.

For more info on available support options for your Dropbox plan, see this article.

If you found the answer to your question in this Community thread, please 'like' the post to say thanks and to let us know it was useful!