python中django的migrate命令总出问题,显示Errno 0,为何?

在models.py中建了一个
class fileDownloadLog(models.Model):
CID = models.CharField(max_length=128)
timeStamp = models.DateTimeField()
建立迁移文件后,执行迁移就会出现下面的输出,不知道啥原因。哪个大神给解答下,谢谢。
---------------------------------------------
c:\mainprj>python manage.py migrate
Operations to perform:
Apply all migrations: admin, auth, contenttypes, encryption, sessions
RTraceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
utility.execute()
File "C:\Python27\lib\site-packages\django\core\management\__init__.py", line
self.fetch_command(subcommand).run_from_argv(self.argv)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 283,
self.execute(*args, **cmd_options)
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 330,
output = self.handle(*args, **options)
File "C:\Python27\lib\site-packages\django\core\management\commands\migrate.py
self.stdout.write(self.style.MIGRATE_HEADING("Running migrations:"))
File "C:\Python27\lib\site-packages\django\core\management\base.py", line 110,
self._out.write(force_str(style_func(msg)))
IOError: [Errno 0] Error

windows 不支持 linux类型的文件操作权限(r+/w+等等)
建议用windows做一个linux虚拟机,或者docker也行,然后运行python就没这个问题了。
温馨提示:答案为网友推荐,仅供参考
相似回答