I was playing with some QR Code generator stuff (that I might get into in some other post eventually)… there are a whole lot of options to pick from, but I got stuck - stupid me - on some Python incarnation for now. It uses Flask, Werkzeug and some other presumingly fancy stuff that I never heard of… so I got curious.

And… - I guess it’s about time to get my hands on Python - as I am a somewhat Ubuntu addicted there is not sooo much hasle to start. Ubuntu Server comes with some decent version of Python3 bundled and the Ubuntu Desktops add Python2 to it. And yeah - the RasPis do it too.

So off we go:

.> python3 -V
Python 3.6.7

.> python2 -V
Python 2.7.15rc1

.> echo 'print("Guess what...")' > script.py
.> python3 script.py
Guess what...


So much - so easy… it seems though that there is quite enough for simple running some scriptlets and ready-to-use stuff that comes with Ubuntu or otherwise, but not much else is installed for actually developing something yourself.

So one of your first steps might be (well for me it was) to install pip - the “npm for python”:

.> apt install python3-pip


It comes with a whole bunch of dependencies … depending on your setup.

But now you can actually do some cool stuff like

.> pip3 install Flask


…but wait. There seems to be some useful concept of virtual environments.

Let’s see … the guys over at Digital Ocean have some info on that. I do like to keep thinks clean and well sorted - at least on my carry-around - I will give that a test run.

Following through “Step 2” of their brief intro documentation I get to a point where

.> ls
bin include lib lib64 pyvenv.cfg share

.> source bin/activate

(my_env) ➜  my_env > ...


NICE … I leave you with the rest of the usual “Hello World” play around, but if You want to leave the virtual environment cage, just …

.> deactivate


it…

See You soon … I need to learn Python now !