vs code python保存时pylint提示"Unable to import 'flask'"

在配置vscode python开发环境时,编写如下代码并保存时,会提示Unable to import 'flask'

from flask import Flask

app = Flask(__name__)

tasks = [
    {
        'id': 1,
        'title': u'Buy groceries',
        'description': u'Milk, Cheese, Pizza, Fruit, Tylenol', 
        'done': False
    },
    {
        'id': 2,
        'title': u'Learn Python',
        'description': u'Need to find a good Python tutorial on the web', 
        'done': False
    }
]

已安装pylint

pip install pylint

这个时候需要配置vscode,对应链接https://code.visualstudio.com/docs/python/environments

 

posted @ 2019-11-29 10:32  _DongGe  阅读(2201)  评论(0编辑  收藏  举报