Events
31 Mar, 23 - 02 Apr, 23
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
You need to configure your development environment with the prerequisites in order to develop an application using the pyodbc Python driver for SQL Server.
This driver requires the host operating system to have the appropriate ODBC driver already installed.
Obtain and install the Microsoft ODBC driver for SQL Server on Linux:
Verify that you have installed the driver.
Get the pyodbc
package from PyPI.
Open a command prompt in an empty directory.
Install the pyodbc
package.
pip install pyodbc
You can use the PyPI command-line tool to verify that your intended packages are installed.
Check the list of installed packages with pip list
.
pip list
Events
31 Mar, 23 - 02 Apr, 23
The biggest SQL, Fabric and Power BI learning event. March 31 – April 2. Use code FABINSIDER to save $400.
Register todayTraining
Learning path
Develop data-driven applications by using Azure SQL Database - Training
Learn how to develop data-driven applications by using Microsoft Azure SQL Database. DP-3020
Documentation
Step 3 - Connecting to SQL using pyodbc - Python driver for SQL Server
Step 3 is a PoC, which shows how you can connect to SQL Server using Python and pyodbc. The basic examples demonstrate selecting and inserting data.
Python SQL Driver - pyodbc - Python driver for SQL Server
This guide describes installing Python, the ODBC Driver for SQL Server, and pyodbc. The corresponding sample code shows how to connect to and interact with a SQL database.
Step 2 - Create a SQL database for pyodbc - Python driver for SQL Server
Step 2 of this getting started guide involves creating a database in SQL Server or Azure SQL Database for this pyodbc sample.