How to install Python on Windows 11

In this article, we have explained how to install Python on Windows 11 step by step. Python is opensource language which used for multiple purposes like web development, data science, networking, as scripting, game development,…..

In this article, we will download and install Python on Windows 11.

Download Python on Windows 11

Continue reading How to install Python on Windows 11

How to connect to PostgreSQL using Python script

In this article, we will see how to connect to PostgreSQL Server using Python script. To connect to PostgreSQL Server from Python, we have to install psycopg2 on Linux or Windows.

Steps to connect to PostgreSQL using Python:

Continue reading How to connect to PostgreSQL using Python script

ModuleNotFoundError: No module named ‘psycopg2’

psycopg2 module is used to connect to PostgreSQL Server using Python. But, if you receive below error means,you have not installed psycopg2 module.

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'psycopg2'

Solution:

Continue reading ModuleNotFoundError: No module named ‘psycopg2’

How to connect to MySQL using Python on Linux

In this article, we will see how to connect to MySQL using Python on Linux.In this article, we will connect to MySQL Server from python using mysql-connector. Connect to Python contains below steps.

1. Install mysql connector.
2. Create connection variable in python script file.
3. Execute command on MySQL Server using python script file.

Connection to MySQL using Python Steps:

Step1: Install mysql connector.
Continue reading How to connect to MySQL using Python on Linux

How to connect to MySQL using Python on Windows

In this article, we will see how to connect to MySQL using Python on Windows. In this article, we will connect to MySQL Server from python using mysql-connector. Connect to Python contains below steps.

1. Install mysql connector.
2. Create connection variable in python script file.
3. Execute command on MySQL Server using python script file.

Connection to MySQL using Python Steps:

Step1: Install mysql connector.
Continue reading How to connect to MySQL using Python on Windows

Authentication plugin ‘caching_sha2_password’ is not supported

Below error occurred when connecting to mysql server from python.

mysql.connector.errors.NotSupportedError: Authentication plugin 'caching_sha2_password' is not supported

Reason:
In MySQL 8.0, caching_sha2_password is the default authentication plugin rather than mysql_native_password.

Continue reading Authentication plugin ‘caching_sha2_password’ is not supported

ModuleNotFoundError: No module named ‘mysql’

When I tried to connect to MySQL from Python received below error.

Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'mysql'

Reason:

We have to install mysql connector or corresponding mysql connector for Python version.

Continue reading ModuleNotFoundError: No module named ‘mysql’