Using Flask in a virtualenv with Pyenv
<p>Im coming back to learning Flask after doing some tutorials a few months back. I have Python 2.7 installed on my Mac but last time I installed &amp; used Python 3 also using Pynv and I also learned how to create and use virtualenvs. </p>

<p>Im trying to run a small Flask app in a virtualenv with Python3 and getting 'ImportError: No module named 'flask'' error. From what I can tell the problem is that I have Flask installed under Python 2.7 as I get this when I run 'pip install flask' from within my venv: </p>

<pre><code>  Requirement already satisfied (use --upgrade to upgrade): flask in    ./venv/lib/python2.7/site-packages
</code></pre>

<p>However when I run 'pyenv local' with venv activated it tells me its 3.4.3, if I then run 'python my_app.py' Flask works just fine but when I run 'python3 my_app.py' I get the 'no module named flask' error.</p>

<p>What am I doing wrong here?</p>