Installing PyQt on Linux

Python by itself is a strong Programming Language but if you want more than lines of codes and Grphical User Interface for users to interact with, you need a GUI framework.
PyQt is one of the GUI frameworks for Python Developers.
Qt by itself is a set of C++ libraries and tools. PyQt is Python binding to work with Qt.

Below is some of the guidelines installing PyQt5 on Debian Linux.
In some Linux Distros where you have two different versions of Python, 2.7 and 3, make sure you use Python3.
Python 2.7 is not officially supported past 2020 anyways so its a good idea to stick with Python3.

Check Python Version

$python3 --version
it should show something like
$python 3.7.3
if you are not already on Python 3.7, install the latest
$sudo apt install python 3.7

Installation

$pip3 install --user pyqt5
$sudo apt-get install python3-pyqt5
$sudo apt-get install pyqt5-dev-tools
$sudo apt-get install qttools5-dev-tools


To test run, start by importing modules from PyQt5 –
from PyQt5 import QtCore, QtGui, QtWidgets

Happy Coding
Regards

Teza

My Journey in Python (or any programming) as a non-Programmer

Python knowledge these days is kinda like a must. Because Python is everywhere and has many uses. Bonus points for you if you have this knowledge.

Disclaimer : This is my experience as a non-programmer learning how to program. My job has never been a Programmer.
I did Networks, Linux, Surveillance, VoIPs throughout my career but never been much into programming.

So I needed to learn Python. What did I do?

First I tried Video Tutorials, I watched a couple of them, Youtube Tutorials, bought some Udemy tutorials and so on. Giving 1 – 3 hours a day, I would complete each series in less than a week.
Was I able to program good enough? Of course Not! I had a basic knowledge and grasp about how functions work, how to use libraries etc. Not that the instructors don’t explain well, the instructors explained very well, I also coded along, but my point is, I had been missing a gap of real life programming.

Not satisfied, I moved onto READING beginners tutorials again. There were many tutorials with examples on how to use loops, data sets etc. Different instructors used different approach. I tried different IDEs, text editors. Theoretically, I thought I knew how to code, but in reality, I could not jump much higher than simple basic programs.

The thing about Python is it’s widely used different sets of applications. Python is everywhere. Realistically what you want to learn is Real life applications. You can start with printing out tuples and simple loops and operators, but eventually you need to jump onto the REAL codes. I mean the REAL CODES. Not just tic-tac-toe games.

So I decided what I wanted to learn. I wanted to build a small camera app. I have a knowledge about Cloud and CCTV networks so I thought I would build a program based on that. But I have to admit, I did not build apps from scratch.

What I did was I Reverse Engineered. I tried to get some source codes from actual working programs, I learned how they worked, learned what each buttons did, and I tried to break the code. Removed some lines, added some lines. Got some more programs, extracted bits out of it, combined in the first program. Installed Libraries and modules. Tried to compile and make them work.

I simply thought rather than myself writing buggy codes and spending hours and hours, its better to learn from more cleaner, well-written codes by more advanced programmers. The more I broke, the more I understood how each lines of codes worked. I thought that was a better learning curve, at least for me. (Again, as a non-programmer)

Maybe if you have ever been stuck on learning programming, you can try my approach. It will not make you the best programmer but it might get you somewhere where you can start. It may even be a short cut for you to become the best programmer.

Regards

Teza