简体   繁体   English

Vscode 无法导入 flask_wtf 和 wtforms

[英]Vscode not able to import flask_wtf and wtforms

I am working with python3 and using flask I tried to install flask_wtf and wtforms but keep getting error from pylint on my imports.我正在使用 python3 并使用 flask 我尝试安装 flask_wtf 和 wtforms 但在我的导入中不断收到来自 pylint 的错误。 I re-installed flask_wtf, checked my path, and closed VsCode code already.我重新安装了 flask_wtf,检查了我的路径,并且已经关闭了 VsCode 代码。 Any help is appreciated任何帮助表示赞赏

The error went away with pip install email_validator pip install email_validator 错误消失了

I had the same problem and it was solved by these steps:我有同样的问题,并通过以下步骤解决:

1 - Install or upgrade using pip. 1 - 使用 pip 安装或升级。

pip install -U Flask-WTF

2- change the python version in VScode 2-在VScode中更改python版本在此处输入图像描述

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM