Installing Flask in 3 hours

I’m still not ready to follow the lyricize tutorial I guess
since the very next step is „through them into a requirements file“
and I’m wondering where the heck do I put it, and where to get the requirements.
So I’m into the tutorials before about setting up flask and
„flask tracking“.

http://gouthamanbalaraman.com/blog/flask-track-usage.html
„Flask Track Usage is a very light weight Flask extension to track usage traffic for Flask apps.
This post will give you a brief introduction to the usage and merits.“
http://jeffknupp.com/blog/2014/01/18/python-and-flask-are-ridiculously-powerful/
inspiring post about python and flask being super powerful.

oh flask is a microframework. What is a microframework?
https://en.wikipedia.org/wiki/Microframework

what is a web application framework?
https://en.wikipedia.org/wiki/Web_application_framework
ok so it has libraries, templating, session management?
It’s a software framework.

What is a software framework?
https://en.wikipedia.org/wiki/Software_framework
ic…

So I actually have to start on the basic tutorial for using flask
which is :http://flask.pocoo.org/docs/0.10/tutorial/introduction/
creating a web app called flaskr

step 0: creating the folers. I don’t know about them but for me
I need to say mkdir to make new folders

step 1: Now I need to know how to make a database with sqlite
because new text file -> change name to schema.sql didn’t work…
https://www.sqlite.org/cli.html

wow, I am having issues with this
I can’t even „import“ sqlite let alone create a .sql table file in
a specified location. The net is giving a lot of info that is not really helping
apt-get
I think once I do get it installed I’ll have to use some kind of sql command
line to create the table? Iunno

I took a break, I just felt physically shity, maybe it was the stonemilled
bread or the swisscheese I had for breakfast. Also working till 10 seems to
affect the quality of my sleep which I felt immediatly on waking up. Either
way I have energy but not like yesterday. SO I decided to lay down and do some
relaxation breathing. I was thinking during this time to because well I just
had a lot of thoughts.

So my thoughts were:
let go of flask and move on to at least using heroku
try to use another database and follow along, like sqalchamemy
it seems just like trying to learn python from a standard tutorial is
slow and ineffective, so is trying to do things the way any tutorial
says I should. I just don’t work that way. I need to do things my own way and be creative.

Another idea I got was to try to use pip install sqlite
another idea is that I can atleast now try the markov program again using py
and see if it works.

omg I tried pip and at least it said collecting before saying it couldn’t
find specified version
Then I googled pip sqlite and got something saying try pip search sqlite and
it generates a huge list

ok, and now a SO forume post has a guy saying he get’s errors
with pip install and the answer is I don’t need to install sqlite3
cause it comes with python2.5 and up…

below it is a guy saying he tried pip install pysqlite (he has py2.7
that worked, it’s downloading. Also I got an AVG threat detected on pip
but I let it go.

so it says completed, but then there is an error missing parenthesis for print
which I guess means pysqlite is trying to install a version below python34
and it’s causeing an error there.

I’ll trying pip install pysqlite3
collecting, retring after timeout…couldnotfind verion
I can also just install and earlier version of python if I’m going to keep
having issues.

ok now I’m following the sqlite tutorial which says download the bindaries etc
in C:
http://www.tutorialspoint.com/sqlite/sqlite_installation.htm

followed all steps (except I just add C:\sqlite not C:\>sqlite)
Then I entered sqlite got error which I expected.
closed and reopened powershell CAUSE I HAVE TO DO THAT after adding a path

and now I got it!

now to create sql file…
oh i guess that didn’t require the sql commandline afterall?
Just need notepad++?
and I’ll use it for creating .py files too I guess

how to exit out of sqlite3
use .help to find out … it’s .quit

ok trying to import flask again says no module found so I’m looking
back at installation of flask.

oh right it’s already installed, I’m just not using it,
I follow this http://flask.pocoo.org/docs/0.10/installation/#installation
to activate a virtual environment.

then go: venv\scripts\activate
…“cannot be loaded because the execution of scripts is disabled on this system“.

SO person says set execution policy to unrestricted.
Set-ExecutionPolicy Unrestricted -Force
got another error, more reading says run powershell as admin so I can change it
ok wow it works, and pip install flask now works

Kommentar verfassen

Trage deine Daten unten ein oder klicke ein Icon um dich einzuloggen:

WordPress.com-Logo

Du kommentierst mit Deinem WordPress.com-Konto. Abmelden /  Ändern )

Google Foto

Du kommentierst mit Deinem Google-Konto. Abmelden /  Ändern )

Twitter-Bild

Du kommentierst mit Deinem Twitter-Konto. Abmelden /  Ändern )

Facebook-Foto

Du kommentierst mit Deinem Facebook-Konto. Abmelden /  Ändern )

Verbinde mit %s