Setting up Flask on Mac OSX Sierra
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)"
- 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.
- 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.
mkvirtualenv testenv and you must see the following.
14. You can leave your virtualenv by…
15. Observe below…
A virtual environment is set up.
Everytime you start
16. Install Flask inside this virtualenv
pip install Flask
IT’S ALL SET…