尝试使用“ pip install flask-wtf”安装flask-wtf之后,没有名为“ flask_wtf”的模块

时间:2019-04-13 06:53:50

标签: python pip flask-wtforms

我正在尝试在我的网络应用中安装flask-wtf,但无法安装 从终端。

错误:

[Running] python -u "c:\Users\PC\Desktop\code\Flask_Blog\forms.py"
Traceback (most recent call last):
  File "c:\Users\PC\Desktop\code\Flask_Blog\forms.py", line 1, in <module>
    from flask_wtf import FlaskForm
ModuleNotFoundError: No module named 'flask_wtf'
#when-i-install
Requirement already satisfied: flask-WTF in c:\users\pc\desktop\code\venv\lib\site-packages (0.14.2)
Requirement already satisfied: Flask in c:\users\pc\desktop\code\venv\lib\site-packages (from flask-WTF) (1.0.2)
Requirement already satisfied: WTForms in c:\users\pc\desktop\code\venv\lib\site-packages (from flask-WTF) (2.2.1)
Requirement already satisfied: Werkzeug>=0.14 in c:\users\pc\desktop\code\venv\lib\site-packages (from Flask->flask-WTF) (0.15.2)
Requirement already satisfied: Jinja2>=2.10 in c:\users\pc\desktop\code\venv\lib\site-packages (from Flask->flask-WTF) (2.10.1)
Requirement already satisfied: click>=5.1 in c:\users\pc\desktop\code\venv\lib\site-packages (from Flask->flask-WTF) (7.0)
Requirement already satisfied: itsdangerous>=0.24 in c:\users\pc\desktop\code\venv\lib\site-packages (from Flask->flask-WTF) (1.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in c:\users\pc\desktop\code\venv\lib\site-packages (from Jinja2>=2.10->Flask->flask-WTF) (1.1.1)

1 个答案:

答案 0 :(得分:0)

我有同样的问题;尝试手动进行安装,对我有用。首先用git克隆它:

git clone git://github.com/lepture/flask-wtf.git

然后您要做的就是像这样在其中运行setup.py文件:

python setup.py install