-
Notifications
You must be signed in to change notification settings - Fork 0
/
00_install_flask_rrdtool.bash
executable file
·62 lines (50 loc) · 1.5 KB
/
00_install_flask_rrdtool.bash
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/bin/bash
#h-------------------------------------------------------------------------------
#h
#h Name: install_flask_rrdtool.bash
#h Type: Linux shell script
#h Purpose: install python and flask for RRDTool_API
#h Project:
#h Usage: copy folder to target place
#h ./install_flask_rrdtool.bash
#h Result:
#h Examples:
#h Outline:
#h Resources:
#h Platforms: Debian Linux (Raspberry Pi OS, Ubuntu)
#h Authors: peb piet66
#h Version: V1.0.0 2023-01-01/peb
#v History: V1.0.0 2022-11-27/peb first version
#h Copyright: (C) piet66 2022
#h License: http://opensource.org/licenses/MIT
#h
#h-------------------------------------------------------------------------------
MODULE='install_flask_rrdtool.bash';
VERSION='V1.0.0'
WRITTEN='2023-01-01/peb'
#exit when any command fails
#set -e
#set path constants
. `dirname $(readlink -f $0)`/00_constants
umask 000
# install rrdtool
sudo apt install rrdtool
sudo apt install librrd-dev libpython3-dev
# install python3
sudo apt install python3
python3 -V
#install pip3
sudo apt install -y python3-pip
#create and activate python environment
sudo apt install -y python3-venv
python3 -m venv $VIRTUAL_ENV
source $VIRTUAL_ENV/bin/activate
#newly create requirements.txt
#pip3 install pipreqs
#export PATH=$PATH:~/.local/bin
#pipreqs .
#install necessary packages
pip3 install -r requirements.txt
#python3 -c "import flask; print(flask.__version__)"
#display installed python packages
pip3 freeze