新电脑运行python manage.py的时候, from . import home报错:ImportError: cannot import name

来源:3-2 .蓝图构建项目目录

慕娘4228142

2018-04-26

项目放到另一台电脑的时候,运行python manage.py,报错:

Traceback (most recent call last):

  File "manage.py", line 7, in <module>

    from app import app  # 导入app对象

  File "C:\PyProjectTest\movie_project_old\movie_project\app\__init__.py", line 4, in <module>

    from app.home import home as home_blueprint  # 导入home蓝图对象

  File "C:\PyProjectTest\movie_project_old\movie_project\app\home\__init__.py", line 3, in <module>

    import app.home.views

  File "C:\PyProjectTest\movie_project_old\movie_project\app\home\views.py", line 3, in <module>

    from . import home

ImportError: cannot import name 'home'


写回答

1回答

rustgopy

2018-05-30

同学,你好,检查一下python版本

0
0

Python Flask 构建微电影视频网站

Python 最好用轻量级框架,让你轻松胜任 Python Web 工程师

683 学习 · 663 问题

查看课程