User:Pedro Sá Couto/Prototyping 5th/Flask App/Raspberry Pi into a Flask App Server: Difference between revisions
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
Go to www folder | Go to www folder | ||
<pre | <pre> | ||
cd /var/www/ | cd /var/www/ | ||
</pre> | </pre> |
Revision as of 01:37, 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