Setting up Flask on Mac OSX Sierra
Working with pip
Before Getting started, you must first install Homebrew by running following on command line.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew doctor
- Now, Install the latest version of Python.
- Any version of Python>2.7 is fine.
- To check the version of python that is pre-installed type the following command in the terminal.
python -V
- Next, install pip. But you need not install it as it also comes along with packages pre-installed.
- Now, install virtualenv by running the following
sudo pip install virtualenv
6. Next, to install virtualenwrapper, just guess what command could it be?
sudo pip install virtualenvwrapper
But, this do not help in most of the cases and the following error comes up

Relax, we can fix it
7. Observe the error. Uninstalling six-1.4.1 failed.
sudo pip install virtualenvwrapper --ignore-installed six

8. Here you go!! Installed virtualenvwrapper successfully.
9. Now, goto

10. Create a .bash_profile
file. It must contain the following.

This runs as the terminal starts.
11. Open a new Shell Window.
12. You must be seeing the following.

13. Run mkvirtualenv testenv
and you must see the following.

14. You can leave your virtualenv by…
deactivate testenv
15. Observe below…

A virtual environment is set up.
Everytime you start workon testenv
16. Install Flask inside this virtualenv
pip install Flask
17. New versions use the following
virtualenv -p python3 env
. ./env/bin/activate
python3 -m pip install -r requirements.txt
18. Use python3 -m pip install packagname
if pip is not correctly configured.
IT’S ALL SET…