WiringPi and Flask Sudo Conflict
<p>I am running my application in a virtualenv using Python3.4.</p>

<p>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 <code>sudo flask</code>.</p>

<p>I've tried making it run on startup by placing some commands in <code>/etc/rc.local</code> so that it can have root access automatically. It only tells me that it can't find basic Python library modules (like <code>re</code>).</p>

<p>My RPI2 is running Raspbian. For the time being I am running it using <code>flask run --localhost=0.0.0.0</code>, which I know I am not supposed to do, but I'll change that later.</p>

<p>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.</p>

python flask raspberry-pi virtualenv wiringpi