Toxenum
Toxenum

Reputation: 21

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.

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!

Upvotes: 1

Views: 504

Answers (1)

Toxenum
Toxenum

Reputation: 21

Okay I got a solution: I don't know why pip installs this libary into the outdated python 2.7 directorys by default. But with pip3 it is possible to install it to python 3.

sudo pip3 install Flask-WTF

Upvotes: 1

Related Questions