0

I'm new in django and facing a problem that I can not migrate changes in when I change the default sqlite3 engine to "djongo".

I'm using ubuntu server, and I have done the following steps:

$ pip3 install djongo


# setup djongo
DATABASES = {
    'default': {
        'ENGINE': 'djongo',
        'NAME': 'zoo',
    }
}

I do not know what is the problem but when I migrate the changes I get the following error message:

File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/home/karam/.local/lib/python3.5/site-packages/djongo/base.py", line 12, in <module>
from .cursor import Cursor
File "/home/karam/.local/lib/python3.5/site-packages/djongo/cursor.py", line 2, in <module>
from .sql2mongo.query import Result
File "/home/karam/.local/lib/python3.5/site-packages/djongo/sql2mongo/__init__.py", line 34
self.alias2op: typing.Dict[str, SQLToken] = alias2op
SyntaxError: invalid syntax

Any ideas what do I missed ?

Karam Haj
  • 1,080
  • 2
  • 9
  • 20
  • 3
    python 3.6 is required for [djongo](https://github.com/nesdis/djongo). – Nalin Dobhal Sep 10 '19 at 09:56
  • I already started working on the current project, what do I need to do to work with 3.6, I installed 3.7 how to continue ? Any suggest ? – Karam Haj Sep 10 '19 at 10:14
  • If you have installed python 3.7 it should work, as python 3.6 is at minimum required. In your trace above you are using python 3.5. – wfehr Sep 10 '19 at 11:03
  • I have it installed, and when I run python3.7 manage.py migrate the output is still same, I think I need to do something else, not only to install the python3.7 – Karam Haj Sep 10 '19 at 12:17

0 Answers0