有没有人成功安装Mosso(cloudfiles)python模块?我正在尝试安装它并收到以下错误。
python-cloudfiles-1.3.1]# python setup.py install
running install
running build
running build_py
running install_lib
byte-compiling /usr/lib/python2.3/site-packages/cloudfiles/container.py to container.pyc
File "/usr/lib/python2.3/site-packages/cloudfiles/container.py", line 74
@requires_name(InvalidContainerName)
^
SyntaxError: invalid syntax
byte-compiling /usr/lib/python2.3/site-packages/cloudfiles/storage_object.py to storage_object.pyc
File "/usr/lib/python2.3/site-packages/cloudfiles/storage_object.py", line 85
@requires_name(InvalidObjectName)
^
SyntaxError: invalid syntax
答案 0 :(得分:5)
看起来你在2.4之前运行的是Python版本 - 它在Python 2.4中引入了它所抱怨的语法(@符号,称为“装饰器”)。