Installing Python 3.8.12 - Ubuntu 20.04.4
(source pages : https://tecadmin.net/install-python-3-8-ubuntu/ , https://docs.python.org/3/tutorial/venv.html )
BellaDati IoT Advance Analytic framework makes possible utilize Machine Learning concepts. There is a possibility to include scripts programmed in Python.
Python is a popular programming language. Besides web and software development, Python is used for data analytics, machine learning, and even design.
BellaDati except of ML offers also tool IDE (stands for Integrated Development Environment ) usable for editing , checking python language scripts.
The description below illustrates how install Python , pip, pylint and modules required for script running.This procedure have been used for specific BellaDati project with python scripts in use.
Python 3.8.12 ( and higher) is recommended and tested |
libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev libffi-dev zlib1g-dev
python3 —version
response: Python 3.8.10
cd /opt
sudo wget https://www.python.org/ftp/python/3.8.12/Python-3.8.12.tgz
sudo tar xzf Python-3.8.12.tgz
cd Python-3.8.12
./configure --enable-optimizations
make install
reboot
python3.8 —version
response: Python 3.8.12
rm /opt/Python-3.8.12.tgz ( removing to save storage space)
/usr/local/bin/python3.8 -m pip install --upgrade pip
/usr/local/bin/python3.8 -m pip --version
response:
pip 22.3 from /usr/local/lib/python3.8/site-packages/pip (python 3.8)
which python3.8
response: /usr/local/bin/python3.8
cd /usr/local/bin
ls -all
response: python3.8, isort... pip3.8 and many files
python3.8 -m pip install pylint
which pylint
response : /usr/local/bin/pylint
pylint —version
response :
pylint 2.15.5
astroid 2.12.12
Python 3.8.12
( the prcedure is the same as for pylint)
python3.8 -m pip install pyflakes
which pyflakes
pyflakes version
response : 2.5.0 Python 3.8.12 on Linux
In this example - specific BellaDati project using Python script The script asked for several modules. The IDE have been used to see errors/warning . The modules needed can be added this way.
python3.8 -m pip list
response:
Package Version
----------------- -------
astroid 2.12.12
dill 0.3.6
isort 5.10.1
lazy-object-proxy 1.8.0
mccabe 0.7.0
pip 21.1.1
platformdirs 2.5.2
pylint 2.15.5
setuptools 56.0.0
tomli 2.0.1
tomlkit 0.11.5
typing-extensions 4.4.0
wrapt 1.14.1
/usr/local/bin/python3.8 -m pip install pandas
response :
Collecting pandas
Downloading pandas-1.5.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
Collecting python-dateutil>=2.8.1
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting numpy>=1.20.3
Downloading numpy-1.23.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (17.1 MB)
Collecting pytz>=2020.1
Downloading pytz-2022.6-py2.py3-none-any.whl (498 kB)
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, pytz, python-dateutil, numpy, pandas
Successfully installed numpy-1.23.4 pandas-1.5.1 python-dateutil-2.8.2 pytz-2022.6 six-1.16.0
/usr/local/bin/python3.8 -m pip list
response:
Package Version
----------------- -------
astroid 2.12.12
dill 0.3.6
isort 5.10.1
joblib 1.2.0
lazy-object-proxy 1.8.0
mccabe 0.7.0
numpy 1.23.4
pandas 1.5.1
pip 22.3
platformdirs 2.5.2
pylint 2.15.5
python-dateutil 2.8.2
pytz 2022.6
scikit-learn 1.1.3
scipy 1.9.3
setuptools 56.0.0
six 1.16.0
sklearn 0.0
threadpoolctl 3.1.0
tomli 2.0.1
tomlkit 0.11.5
typing_extensions 4.4.0
wheel 0.37.1
wrapt 1.14.1
cd /usr/local/lib/python3.8/site-packages