Dropbox AttributeError:'模块'对象没有属性'Dropbox'

问题描述 投票:1回答:1

我是python的新手。我想尝试最简单的保管箱示例。

import dropbox
dbx = dropbox.Dropbox('access_token')
dbx.users_get_current_account()

但是它给了我以下错误:

Traceback (most recent call last):
  File "/Users/Peezy/Desktop/test.py", line 2, in <module>
    dbx = dropbox.Dropbox('access_token')
AttributeError: 'module' object has no attribute 'Dropbox'
[Finished in 0.2s with exit code 1]
[shell_cmd: python -u "/Users/Peezy/Desktop/test.py"]
[dir: /Users/Peezy/Desktop]
[path: /Library/Frameworks/Python.framework/Versions/3.6/bin:/opt/local/bin:/opt/local/sbin:/Library/Frameworks/Python.framework/Versions/2.7/bin:/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/usr/local/aria2/bin:/opt/X11/bin]

在我看来,python找不到我的保管箱库。我已经使用“ sudo pip install dropbox”正确安装了保管箱(至少我认为是这样)。如何解决此问题?

python dropbox
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.