pydal requires pymongo version >= 3.0, found '2.2.1'

86 Views Asked by At

Web2py Error:

   <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'
>>> 

Environment: OSX Can someone help in resolving Web2py error?

1

There are 1 best solutions below

0
Anthony On

It looks like you are running the OSX binary version of web2py, which comes with its own Python 2 interpreter (currently, web2py runs under Python 2 only), so it will ignore your system's Python installation (and web2py wouldn't run under your Python 3 installation anyway). The web2py binary version does not come with pymongo, so I'm not sure where that pymongo version 2.2.1 has come from, unless you installed it yourself in /web2py.app/Contents/Resources/site-packages.

One option is to install Python 2.7, install pymongo, and then download the source version of web2py instead of the OSX binary.