User:Pedro Sá Couto/Prototyping 5th/Flask App/Raspberry Pi into a Flask App Server: Difference between revisions
(Created page with "=Installing Flask in a Raspberry Pi= <pre style="color: silver; background: black;"> cd /var/www/ </pre>") |
No edit summary |
||
(8 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Installing Flask in a Raspberry Pi= | =Installing Flask in a Raspberry Pi= | ||
===01 Install virtual environment=== | |||
<pre style="color: silver; background: black;"> | |||
sudo apt install python3-venv | |||
</pre> | |||
===02 Go to www folder=== | |||
<pre style="color: silver; background: black;"> | <pre style="color: silver; background: black;"> | ||
cd /var/www/ | cd /var/www/ | ||
</pre> | |||
===03 Create a flask app server here=== | |||
<pre style="color: silver; background: black;"> | |||
sudo mkdir TacticalApp | |||
</pre> | |||
===04 Go into the folder=== | |||
<pre style="color: silver; background: black;"> | |||
cd TacticalApp | |||
</pre> | |||
===05 Create a virtual environment in this folder=== | |||
<pre style="color: silver; background: black;"> | |||
sudo python3 -m venv venv | |||
</pre> | |||
===06 Check who owns the venv=== | |||
<pre style="color: silver; background: black;"> | |||
stat venv/ | |||
</pre> | |||
===07 Change the owner to your user (mine is mrb)=== | |||
<pre style="color: silver; background: black;"> | |||
sudo chown -R mrb:mrb venv | |||
</pre> | |||
===08 Activate de virtual environment=== | |||
<pre style="color: silver; background: black;"> | |||
. venv/bin/activate | |||
</pre> | |||
===09 Deactivate de virtual environment=== | |||
<pre style="color: silver; background: black;"> | |||
deactivate | |||
</pre> | |||
===10 Install Flask=== | |||
<pre style="color: silver; background: black;"> | |||
pip3 install flask | |||
</pre> | </pre> |
Latest revision as of 23:06, 29 March 2020
Installing Flask in a Raspberry Pi
01 Install virtual environment
sudo apt install python3-venv
02 Go to www folder
cd /var/www/
03 Create a flask app server here
sudo mkdir TacticalApp
04 Go into the folder
cd TacticalApp
05 Create a virtual environment in this folder
sudo python3 -m venv venv
06 Check who owns the venv
stat venv/
07 Change the owner to your user (mine is mrb)
sudo chown -R mrb:mrb venv
08 Activate de virtual environment
. venv/bin/activate
09 Deactivate de virtual environment
deactivate
10 Install Flask
pip3 install flask