I'm trying to use mongokit in my Pyramid project, but when I import it, I get the following error.
File "foo.py", line 5, in <module>
import mongokit
File "/home/.../mongokit/__init__.py", line 33, in <module>
from cursor import Cursor
ImportError: No module named 'cursor'
There is a cursor.py file with a Cursor class in it in the same folder as __init__.py.
According to the documentation, when you import a module, it is supposed to put its own directory at the beginning of the search path. However, when I print out sys.path from both foo.py and __init__.py, it is the same in both places.
I can't find anyone else having this problem.
Edit: I am using Python 3.3
The same error may occur if you use python 3.x and try to import some module for python 2.x.