Skip to content
This repository has been archived by the owner on Jul 14, 2020. It is now read-only.

Cannot use mongokit with either python3 or python2 #251

Closed
ghost opened this issue May 2, 2016 · 5 comments
Closed

Cannot use mongokit with either python3 or python2 #251

ghost opened this issue May 2, 2016 · 5 comments

Comments

@ghost
Copy link

ghost commented May 2, 2016

In python3 doing from mongokit import Document, Connection gives me

ImportError                               Traceback (most recent call last)
<ipython-input-1-6f596f957541> in <module>()
----> 1 from mongokit import Document, Connection

/<pathtoproject>venv/lib/python3.4/site-packages/mongokit/__init__.py in <module>()
     29 
     30 from bson.dbref import DBRef
---> 31 from cursor import Cursor
     32 from operators import *
     33 from schema_document import *

ImportError: No module named 'cursor'

and in python2, running the same import gives

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/<pathtohome>/.local/lib/python2.7/site-packages/mongokit/__init__.py", line 40, in <module>
    from master_slave_connection import MasterSlaveConnection
  File "/<pathtohome>/.local/lib/python2.7/site-packages/mongokit/master_slave_connection.py", line 7, in <module>
    from pymongo.master_slave_connection import MasterSlaveConnection as PymongoMasterSlaveConnection
ImportError: No module named master_slave_connection

I'm having trouble getting a clear picture of mongokit's status on python3.

@evilhamsterman
Copy link

I think that sadly MongoKit is dead see issue #182. There haven't been any updates in months, it is failing because it doesn't support pymongo 3+ which is the version that gets pulled down or python 3. There is MongoKat which looks like it might be picking up where MongoKit left off but it also seems to have died off since there hasn't been any activity since March.

@ghost
Copy link
Author

ghost commented Jun 17, 2016

I have in fact switched to using Mongokat, which is nice, but not as full featured as Mongokit.

Might as well leave the issue open in case one day things change.

@sylvinus
Copy link

@evilhamsterman MongoKat is definitely not dead, it's used in production, actively supported and we just merged Python 3 support :-)

@aghae
Copy link

aghae commented Sep 27, 2017

For python 2.x downgrade pymongo to 2.8:
$ pip install pymongo==2.8

For python 3.x install mongokit-py3 :
$ pip uninstall mongokit
$ pip install mongokit-py3

@kumudraj
Copy link

kumudraj commented Nov 2, 2018

pip install mongokit-py3, give me error : ModuleNotFoundError: No module named 'pymongo.master_slave_connection'

This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants