我是 python 新手。今天我正在尝试将我的树莓派连接到保管箱。我按照本教程http://cttoronto.com/03/16/2013/raspberry-pi-dropbox-sync/进行操作。我cli_client.py
以示例为例并插入了我的应用程序 ID 等。
import cmd
import locale
import os
import pprint
import shlex
from dropbox import client, rest, session
APP_KEY = "XXX"
APP_SECRET = "XXX"
ACCESS_TYPE = "Full Dropbox"
sess = session.DropboxSession(APP_KEY,APP_SECRET,ACCESS_TYPE)
request_token = sess.obtain_request_token()
url = sess.build_authorize_url(request_token)
然后我尝试执行脚本但收到以下错误(sudo python cli_client.py
):
Traceback (most recent call last):
File "cli_client.py", line 7, in <module>
from dropbox import client, rest, session
File "/var/tmp/setuptools/dropbox-python-sdk-1.5.1/example/dropbox.py", line 7, in <module>
from dropbox import client, rest, session
ImportError: cannot import name client
我究竟做错了什么 ?