Using Flask in a virtualenv with Pyenv Using Flask in a virtualenv with Pyenv flask flask

Using Flask in a virtualenv with Pyenv


You aren't doing anything wrong. When pyenv activates the virtual environment it points 'python' to the virtualenv python executable but not 'python3'.

You can confirm this by performing these commands:

which python3which python


You need to use the toolchain for the same version: Having Flask installed for python 2 won't make it usable for python 3.

Create your virtualenv with the python 3 version (venv-py3, probably), and install packages with version 3 of pip (pip3, probably).