When I run my flask project on my server, I get the following error:
Traceback (most recent call last):
File "File.py", line 1, in <module>
from flask import Flask, request
ImportError: No module named 'flask'
But I have flask installed!
$sudo pip install flask
Requirement already satisfied: flask in /usr/local/lib/python2.7/dist-packages
Requirement already satisfied: itsdangerous>=0.21 in /usr/local/lib/python2.7/dist-packages (from flask)
Requirement already satisfied: click>=2.0 in /usr/local/lib/python2.7/dist-packages (from flask)
Requirement already satisfied: Werkzeug>=0.7 in /usr/local/lib/python2.7/dist-packages (from flask)
Requirement already satisfied: Jinja2>=2.4 in /usr/local/lib/python2.7/dist-packages (from flask)
Requirement already satisfied: MarkupSafe>=0.23 in /usr/local/lib/python2.7/dist-packages (from Jinja2>=2.4->flask)
This is driving me crazy. I've tried what other SO answers have suggested, including using a venv, but they all produce this same error. Anyone have a suggestion?
$ which python
/usr/bin/python
$ which python3
/usr/bin/python3
I'm running python 3.5.2