Flask note

10 Oct 2018

was inspired by a very interesting web-based CHINESE dos game site.

Had a look about Flask

pip install Flask done but the simply test hello.py dosent work and showed cannot import the library check the pip freeze it there. I reckon it is about pythonpath, (use pycharm IDE a lot and everything can be done by simple click.) fix:

get the directory of flask : pip show flask Location: /usr/local/lib/python2.7/site-packages

cd ~

nano .bash_profile

add export PYTHONPATH=/Library/Frameworks/Python.framework/Versions/2.7/bin/python2

save and exit, and source .bash_profile

worked. $ python hello.py

It is lightwieght server? interesting