You are likely encountering issues as it does not appear that you have "sourced" your environment correctly if what you have posted is accurate. I also recommend that you specify what version of python you are using to avoid issues with compatibility when you have both python2 and python3. If this is not the case, please edit your question and this answer can be removed or edited in turn.
The basics of creating a python 3 virtual environment are:
python3 -m venv /path/to/virtual/env
You may need to install
venv first (
apt install python3-venv) and remember that your path and virtual environment itself has to be a place your user has permission to write to. At this point you should be in your virtual environment (
(env) user@host:~$ _).
You should not need
pip installs the package globally/system-wide. This pretty much defeats the purpose of your virtual environment which is to isolate a python environment for development and testing. Refer to official Python and the offending package documentation, if they do not install properly without
sudo as it may mean you are missing a dependency or additional configurations in your virtual environment.
On a Debian 9.8 system (Linux 4.9.0-8-amd64), running the above steps and then running the following yielded me these results:
(env) user@host:~$ pip3 install flask
(env) user@host:~$ pip3 list --format=legacy
(env) user@host:~$ python3 --version