I am running my application in a virtualenv using Python3.4.
WiringPi requires sudo privilege to access the hardware pins. Flask, on the other hand, resides in my virtualEnv folder, so I can't access it using sudo flask.
I've tried making it run on startup by placing some commands in /etc/rc.local so that it can have root access automatically. It only tells me that it can't find basic Python library modules (like re).
My RPI2 is running Raspbian. For the time being I am running it using flask run --localhost=0.0.0.0, which I know I am not supposed to do, but I'll change that later.
Turns out I just had to make sure that "root" had the proper libraries installed too. Root and User have different directories for their Python binaries.
WiringPi and Flask Sudo Conflict