首页 > 解决方案 > pylint E4010:无法导入“google.appengine.ext”

问题描述

我的烧瓶应用程序中有这些导入。

from google.appengine.ext import deferred
from google.appengine.api.taskqueue import TaskRetryOptions
from google.appengine.ext import ndb

我收到错误: 在此处输入图像描述 在 settings.json 上它说:

// List of paths to libraries and the like that need to be imported by auto complete engine. E.g. when using Google App SDK, the paths are not in system path, hence need to be added into this list.
  "python.autoComplete.extraPaths": []

所以我尝试了:

{
    "python.autoComplete.extraPaths": ["/Users/macbookpro/Developer/google-cloud-sdk/platform/google_appengine/google/appengine.ext"]
}

但这并不能解决问题。如何修复 pylint 错误?我在 Mac OS High Sierra、Visual Studio Code 上。

标签: visual-studio-code

解决方案


尝试从路径中删除/google/appengine.ext 。重新启动 VSCode。


推荐阅读