User:Pedro Sá Couto/Prototyping 5th/Flask App/Raspberry Pi into a Flask App Server: Difference between revisions

From XPUB & Lens-Based wiki
No edit summary
No edit summary
Line 1: Line 1:
=Installing Flask in a Raspberry Pi=
=Installing Flask in a Raspberry Pi=
<br><br>
<br><br>
pre.bash {
background-color: black;
color: grey;
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;
}
Install virtual environment
Install virtual environment
<pre style="color: silver; background: black;">
<pre>
sudo apt install python3-venv
sudo apt install python3-venv
</pre>
</pre>

Revision as of 13:19, 25 March 2020

Installing Flask in a Raspberry Pi



pre.bash {

background-color: black;
color: grey;
font-family: Consolas,Monaco,Lucida Console,Liberation Mono,DejaVu Sans Mono,Bitstream Vera Sans Mono,Courier New, monospace;

}

Install virtual environment

sudo apt install python3-venv

Go to www folder

cd /var/www/

Create a flask app server here

sudo mkdir TacticalApp

Go into the folder

cd TacticalApp

Create a virtual environment in this folder

sudo python3 -m venv venv

Check who owns the venv

stat venv/

Change the owner to your user (mine is mrb)

sudo chown -R mrb:mrb venv

Activate de virtual environment

. venv/bin/activate

Deactivate de virtual environment

deactivate

Install Flask

pip3 install flask