在配置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