So begins my journey into Raspberry Pi for use as a learning tool for code development (both web and otherwise). The first thing that I tasked myself with was to get python and flask working. Since I am still new to this, and not currently a python developer, this seemed like a task to me. I had already played around with setting up Mono+nginx+FastCGI and had quite a bit of difficulty… so I was expecting to spend some time on this. So what is flask…? well, I don’t know yet. From what I understand, it is a framework to set python up to host a website… but let’s check google:
Wikipedia describes Flask as: flask is a lightweight web application framework written in Python and based on the WSGI toolkit and Jinja2 template engine. It is BSD licensed.
Awesome! So flask is a framework that makes creating websites in python easier. What is pip you may ask? Let’s check out google again:
Google describes pip as: pip is a package management system used to install and manage software packages written in Python. Many packages can be found in the Python Package Index (PyPI).
Cool, so pip makes it easier for us to get the wheel, instead of re-inventing it. Again, Awesome! So, how do we do all this? well that seems simple enough. The first step is to install Python PIP.
Open a terminal to your raspberry pi and type:
sudo apt-get install python-pip
when asked, confirm (yes) the installation to continue.
Now that you have PIP installed, you can go ahead and install the Flask Framework:
sudo pip install flask
That’s it! Really? YES! Super easy.
For more info, including how to test this, I found a great blog on the subject: http://mattrichardson.com/Raspberry-Pi-Flask/
ENJOY!