Saturday, September 12, 2020

Setting up Sqlite3 Python embedded database and Sqlitebrowser on CentOS 8.2

First instatll "Development Tools", rebuild Python 3.8.5
after installation sqlite-devel. Afterwards build sqlitebrowser from source rather then install vi snap, just a couple qt5-devel packages would have to be installed for successful build on CentOS 8.2.

$ sudo dnf groupinstall "Development Tools" -y
$ sudo dnf install sqlite-devel

Rebuild Python

$cd ; $ cd ./Python-3.8.5
$ ./configure —enable-optimizations
$ sudo make altinstall

Prepare to build sqlitebrowser which wouldn't
have any issues with Qt vs the one provided via snap

$ sudo dnf install qt5-devel qwt-qt5-devel -y



Build sqlitebrowser

$ git clone https://github.com/sqlitebrowser/sqlitebrowser
$ cd sqlitebrowser
$ cmake -Wno-dev .
$ make
$ sudo make install



Make sure

[boris@Server82 ~]$ python3.8
Python 3.8.5 (default, Sep 11 2020, 12:09:30)
[GCC 8.3.1 20191121 (Red Hat 8.3.1-5)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>>
Now follow for instance https://pymotw.com/2/sqlite3/ and see
basic DDL && DML operations work with no problems via Python API .
However, Encrypting would require Python 2.7


                                                

Thursday, September 10, 2020

Setting up Python 3.8.5 on Linux && Getting LibreOffice 7.0 for free

$  wget https://www.python.org/ftp/python/3.8.5/Python-3.8.5.tgz
$   sudo dnf groupinstall "Development Tools" -y
$   tar xvf Python-3.8.5.tgz
$  cd  ./Python-3.8.5
$    ./configure --enable-optimizations
$  sudo make altinstall

[boris@Server82 ~]$ python3.8 --version
Python 3.8.5
[boris@Server82 ~]$ 

Just for fun solve #25 from USE Demo 2021  (optimal code belongs to Eugene Dzhobs)
#25



Would you like to install sqlite3 Python embedded database on CentOS 8.2
$ sudo dnf install sqlite-devel
$  cd  ./Python-3.8.5
$    ./configure --enable-optimizations
$  sudo make altinstall