无法导入库flask python

2024-06-25 23:00:20 发布

您现在位置:Python中文网/ 问答频道 /正文

我在做教程https://docs.mongodb.org/ecosystem/tutorial/write-a-tumblelog-application-with-flask-mongoengine/。我正在导入库

from tumblelog import app 

它不起作用。我也找不到这个库tumblelog。 我的目录结构:C:\flask tumblelog master\tumblelog\ 这就是我的项目所在地。在


Tags: fromhttpsorgflaskdocsapplicationmongodbwith
1条回答
网友
1楼 · 发布于 2024-06-25 23:00:20

在教程中(加粗表示强调):

First, create a simple “bare bones” application. Make a directory named tumblelog for the project and then, add the following content into a file named __init__.py:

tumblelog不是您安装的内容。这是你做的。创建目录并将应用程序代码放入其中。在

相关问题 更多 >