[英]ImportError with flask_wtf on Raspberry PI 3
first of all pls excuse my bad english skills ^^ 首先请原谅我的英语水平不好^^
My problem looks very simple to solve but I cant get flask_wtf running on my Raspberry Pi 3. I want to create a form with Flask-WTF but i am not able to import it. 我的问题看起来很容易解决,但是我无法在Raspberry Pi 3上运行flask_wtf。我想用Flask-WTF创建一个表单,但是我不能导入它。
I first installed it with 我先用
sudo pip install Flask-WTF
When I import the module 当我导入模块
from flask_wtf import FlaskForm
and run the program I get this: 并运行我得到的程序:
ImportError: No module named 'flask_wtf'
If I try to install it again, I get: 如果我尝试再次安装它,则会得到:
Requirement already satisfied: Flask-WTF in /usr/local/lib/python2.7/dist-packages
Thanks in advance! 提前致谢!
Okay I got a solution: I don't know why pip installs this libary into the outdated python 2.7 directorys by default. 好的,我有一个解决方案:我不知道为什么pip默认将此库安装到过时的python 2.7目录中。 But with pip3 it is possible to install it to python 3.
但是使用pip3可以将其安装到python 3。
sudo pip3 install Flask-WTF
sudo pip3安装Flask-WTF
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.