Web2py错误:
<type 'exceptions.RuntimeError'> Failure to connect, tried 5 times:
Traceback (most recent call last): File
"/Applications/web2py.app/Contents/Resources/gluon/packages/dal/pydal/base.py",
line 446, in __init__ File
"/Applications/web2py.app/Contents/Resources/gluon/packages/dal/pydal/adapters/base.py", line 60, in __call__ File
"/Applications/web2py.app/Contents/Resources/gluon/packages/dal/pydal/adapters/mongo.py",
line 91, in __init__ Exception: pydal requires pymongo version >= 3.0, found '2.2.1'
Version web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47
的Python:
python
Python 3.5.1 (v3.5.1:37a07cee5969, Dec 5 2015, 21:12:44)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pymongo
>>> pymongo.version
'3.3.0'
>>>
环境:OSX 有人可以帮助解决Web2py错误吗?
答案 0 :(得分:0)
看起来您正在运行OSX二进制版本的web2py,它带有自己的Python 2解释器(目前,web2py仅在Python 2下运行),因此它将忽略您系统的Python安装(和web2py)无论如何都不会在你的Python 3安装下运行)。 web2py二进制版本没有附带pymongo,所以我不确定pymongo 2.2.1版本的来源,除非你自己在/web2py.app/Contents/Resources/site-packages中安装它。
一种选择是安装Python 2.7,安装pymongo,然后下载web2py的源代码而不是OSX二进制文件。