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>
====Install virtual environment====
Install virtual environment
<pre style="color: silver; background: black;">
<pre style="color: silver; background: black;">
sudo apt install python3-venv
sudo apt install python3-venv
Line 7: Line 7:


Go to www folder
Go to www folder
<pre>
<pre style="color: silver; background: black;">
cd /var/www/
cd /var/www/
</pre>
</pre>

Revision as of 01:38, 24 March 2020

Installing Flask in a Raspberry Pi



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