我在我的桌面上设置了 Doccano 来执行序列标记任务。我按照网站上有关如何设置 Doccano 的说明进行操作。一切正常,直到我遇到迁移错误的最后一个代码。
$ git clone https://github.com/chakki-works/doccano.git
$ cd doccano
$ pip install -r requirements.txt
$ cd app
$ python manage.py createsuperuser
这是在 git bash 上运行上面的最后一个代码后出现的错误
You have 29 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): admin, api, auth, authtoken, contenttypes, sessions, social_django.
Run 'python manage.py migrate' to apply them.
Traceback (most recent call last):
File "C:\Users\okekec\AppData\Local\Continuum\anaconda3\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\okekec\AppData\Local\Continuum\anaconda3\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
return Database.Cursor.execute(self, query, params)
sqlite3.OperationalError: no such table: auth_user
File "C:\Users\okekec\AppData\Local\Continuum\anaconda3\lib\site-packages\django\db\utils.py", line 89, in __exit__
raise dj_exc_value.with_traceback(traceback) from exc_value
File "C:\Users\okekec\AppData\Local\Continuum\anaconda3\lib\site-packages\django\db\backends\utils.py", line 85, in _execute
return self.cursor.execute(sql, params)
File "C:\Users\okekec\AppData\Local\Continuum\anaconda3\lib\site-packages\django\db\backends\sqlite3\base.py", line 298, in execute
return Database.Cursor.execute(self, query, params)
django.db.utils.OperationalError: no such table: auth_user
错误说运行'python manage.py migrate。当我在终端中运行代码时,我得到一个 [Errno 2] No such file or directory。请看下文。谢谢你的帮助。
C:\Users\okekec>python manage.py migrate
python: can't open file 'manage.py': [Errno 2] No such file or directory