报错帮忙解决下

来源:2-6 让工程在ubuntu上run起来

cnady

2019-12-28

[root@node1 imoocc]# python manage.py makemigrations
Traceback (most recent call last):
File “manage.py”, line 15, in
execute_from_command_line(sys.argv)
File “/root/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/core/management/init.py”, line 401, in execute_from_command_line
utility.execute()
File “/root/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/core/management/init.py”, line 377, in execute
django.setup()
File “/root/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/init.py”, line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File “/root/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/apps/registry.py”, line 114, in populate
app_config.import_models()
File “/root/.pyenv/versions/3.6.3/lib/python3.6/site-packages/django/apps/config.py”, line 211, in import_models
self.models_module = import_module(models_module_name)
File “/root/.pyenv/versions/3.6.3/lib/python3.6/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “

centos7 python3.6.3 没弄过django
在网上查了,但不知道怎么改!
查了说是改这个东西,但我不知道在哪里改。实在没弄过django
herobook=models.ForeignKey(‘BookInfo’,on_delete=models.CASCADE,)

写回答

1回答

Jeson

2019-12-31

请问你的代理是用的python3版本吗?

0
1
gongwanyi
看错了,老师我的问题帮忙解答一下吧
2019-12-31
共1条回复

Python+Django+Ansible Playbook自动化运维项目实战

【课程升级3.6版本】大牛全面践行DevOps,运维与开发间高效协作

861 学习 · 326 问题

查看课程