0

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 错误吗?

4

1 回答 1

0

看起来您正在运行 web2py 的 OSX 二进制版本,它带有自己的 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 二进制文件。

于 2016-10-11T15:06:33.160 回答