Install virtualenv virtualenvwrapper
I am trying to create a sample flask app by following this tutorial https://realpython.com
You shouldn't be using your system's version of Python.
According to Python's docs:
The version of Python that ships with OS X is great for learning but it’s not good for development.
According to Apple's docs:
Developers using Perl, Python, Ruby, or any other scripting languages that ship with OS X, are encouraged to manage their own installations of the language and dependencies ...
So, I recommend installing Python 2 and/or Python 3 using homebrew as suggested and described in Python's OS X installation docs.
Note that these instructions provide the command to install Python 2. To install Python 3, you would run:
brew install python3 # instead of 'brew install python'
These Python installation docs also link to detailed instructions for installing virtualenv and virtualenvwrapper.
Update:
It looks like you have virtualenvwrapper
installed, but not properly configured. When I installed it, I ran the following code based on installation docs for virtualenvwrapper to configure:
# Create a directory to hold the virtual environments.
mkdir $HOME/.virtualenvs
echo "
# Python's virtualenvwrapper-RELATED
export WORKON_HOME=$HOME/.virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
" >> ~/.bash_profile
source ~/.bash_profile