ubuntu - 如何在 ubuntu 中运行 web2py?

标签 ubuntu web2py

我从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/

相关文章:

mysql - Bazaar分店默认位置

python - web2py Ajax 搜索

python - web2py中如何允许多个表单提交?

python - 使用前预处理表单数据

python - 我如何在 Heroku 上使用 web2py?

在 C++ 应用程序之上用于 REST API 的 Python 框架

php - 我无法在 ubuntu 上运行 artisan 命令

ruby-on-rails - Carrierwave:本地镜像的权限被拒绝

linux - 如何在 bash 脚本中使用 grep 命令来搜索一行,但只打印该行的某些部分,并特别排除该单词本身?

git - 如何查找或更改 Git 存储库服务器的 url