Need help with python SQL

I am trying to install a driver and connect to a database in VSC using the following code:

import mysql.connector
cnx = mysql.connector.connect(user=‘root’,
password=‘MyNewPass’,
host=‘127.0.0.1’,
database=‘education’,
auth_plugin=‘mysql_native_password’)
cursor = cnx.cursor()
query = (“SELECT * FROM colleges”)
cursor.execute(query)
for row in cursor.fetchall():
print(row)
cursor.close()
cnx.close()

When I try to connect (python3 read.py), in Terminal I get the following ERROR message (1.) When I test for python installation, it shows the version installed (2), hence ok.
(1.) PS C:\Users\maria\OneDrive\Desktop\Sample> python3 read.py
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
(2.)PS C:\Users\maria\OneDrive\Desktop\Sample> python --version
Python 3.11.0
Python with all scripts is installed, the Command Line shows the version and it is added to the path.

I have checked all possible reasons:

  1. In both System Variables and User Variables, Python is added to Path Variables. I reinstalled python to ensure “PATH” is ticked at the installation.
  2. I disable both Python and Python3 apps in “Settings > Manage App Execution Aliases”. In this case I get the following ERROR message
    "python3 : The term ‘python3’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:1+ python3 read.py
  •   + CategoryInfo          : ObjectNotFound: (python3:String) [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException"
    
    

I would really appreciate if somebody could help to resolve the issue.