Python

Python Installation

Steps to install Python and Pyodbc are as follows:

1) Download and install Python
https://www.python.org/downloads/

2) By default Python gets installed at the following location
C:\Users\XYZ\AppData\Local\Programs\Python\Python39\Scripts (Replace “XYZ” with the folder name in your computer at C:\Users)

3) Install Microsoft ODBC driver 17 for SQL Server (x64) or Install Microsoft ODBC driver 17 for SQL Server (x86) according to your requirement
https://docs.microsoft.com/en-us/sql/connect/odbc/download-odbc-driver-for-sql-server?view=sql-server-ver15#download-for-windows

4) Type cmd in your computer search box

5) Right click on command prompt App and Run as administrator

6) Use PIP to install pyodbc
At command prompt
> cd C:\Users\XYZ\AppData\Local\Programs\Python\Python39\Scripts (Replace “XYZ” with the folder name in your computer at C:\Users)
> pip install pyodbc

 7) Install python support in Visual studio

  • If you don’t have visual studio install visual studio with python support
    https://docs.microsoft.com/en-us/visualstudio/python/installing-python-support-in-visual-studio?view=vs-2019
  • If you already have visual studio modify visual studio for python support
    https://docs.microsoft.com/en-us/visualstudio/install/modify-visual-studio?view=vs-2019

8) Launch Visual Studio and search for python

9) Select Python Application