我从http://web2py.com/examples/default/download下载了源码包,但我无法使用此命令启动 web2py:
tom@ubuntu:~/web2py$ python web2py.py -a 'your password' -i 127.0.0.1 -p 8000
Traceback (most recent call last):
File "web2py.py", line 16, in <module>
import gluon.widget
File "/home/tom/web2py/gluon/widget.py", line 85
print 'warning: unable to detect your browser'
^
SyntaxError: invalid syntax
我用的是python3.1,这个版本的web2py怎么运行?
最佳答案
如果 Python 3 是你的默认解释器,而不是
python web2py.py -a 'your password' -i 127.0.0.1 -p 8000
使用
python2.7 web2py.py -a 'your password' -i 127.0.0.1 -p 8000
关于ubuntu - 如何在 ubuntu 中运行 web2py?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5297117/