By the way I tried installing pymongo two ways: 

1) easy_install which put the pymongo .so files in my home/cindy/ folder 
which I assumed web2py couldn't find (since web2py is in home/www-data/ ). 
So I uninstalled that.

2) sudo pip   which put all the unzipped pymongo files in the 
/usr/local/lib/python2.7/dist-packages/ folder with root:staff ownership 
and everyone  "r" privileges.

There is a /usr/local/lib/python2.7/site-packages/ folder but nothing is in 
it. Should I move the pymongo files from the /dist-packages folder into the 
/site-pckages folder?

Would that help web2py to find pymongo?

Thanks very much!



On Saturday, May 17, 2014 7:43:51 PM UTC-6, Cynthia Butler wrote:
>
> I am trying to use MongoDB 2.6.1 and pymongo 2.7 with the DAL on my local 
> ubuntu 14.04 machine.
> I have followed instructions in Alan's slice but web2py is not able to find 
> the pymongo driver.
> It works ok from the python shell and the mongo shell also works. 
> My guess is that I don't have something configured correctly or don't have 
> the correct permissions/location.
> I have spent 2 days researching/trying to fix but cannot figure it out and 
> now the web2py internal python shell is broken.
>
> How do I get mongodb and pymongo working? (I'm a noobie). Thanks!
>
> [web2py 2.9.5-stable+timestamp.2014.03.16.02.35.39, (Running on nginx/1.6.0, 
> Python 2.7.6)]
>
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/restricted.py", line 220, in restricted
>     exec ccode in environment
>   File "/home/www-data/web2py/applications/seagull/models/db.py" 
> <https://localhost/admin/default/edit/seagull/models/db.py>, line 16, in 
> <module>
>     datab = DAL("mongodb://127.0.0.1:27017/test_database", 
> check_reserved=["mongodb_nonreserved"], adapter_args={"safe":False})
>   File "/home/www-data/web2py/gluon/dal.py", line 7867, in __init__
>     raise RuntimeError("Failure to connect, tried %d times:\n%s" % (attempts, 
> tb))
> RuntimeError: Failure to connect, tried 5 times:
> Traceback (most recent call last):
>   File "/home/www-data/web2py/gluon/dal.py", line 7845, in __init__
>     self._adapter = ADAPTERS[self._dbname](**kwargs)
>   File "/home/www-data/web2py/gluon/dal.py", line 688, in __call__
>     obj = super(AdapterMeta, cls).__call__(*args, **kwargs)
>   File "/home/www-data/web2py/gluon/dal.py", line 5584, in __init__
>     if do_connect: self.find_driver(adapter_args)
>   File "/home/www-data/web2py/gluon/dal.py", line 830, in find_driver
>     raise RuntimeError("no driver available %s" % str(self.drivers))
> RuntimeError: no driver available ('pymongo',)
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to