我已根据本网站的安装说明安装swagger-render
至pip
:
但是当我尝试启动它时,我看到了奇怪的语法错误。有人可以解释并帮助解决这个问题吗?
$ python --version
Python 2.7.15
$ pip --version
pip 10.0.1 from /usr/local/lib/python2.7/site-packages/pip (python 2.7)
$ swagger-render swagger.yaml -o index.html
Traceback (most recent call last):
File "/usr/local/bin/swagger-render", line 7, in <module>
from swagger_render.__main__ import main
File "/usr/local/lib/python2.7/site-packages/swagger_render/__main__.py", line 49
def all_of(*items, root=None):
^
SyntaxError: invalid syntax