Skip to content

Latest commit

 

History

History
79 lines (49 loc) · 2.85 KB

step-1-configure-development-environment-for-pyodbc-python-development.md

File metadata and controls

79 lines (49 loc) · 2.85 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic
Step 1 - Configure pyodbc environment
Step 1 of this getting started guide involves installing Python, the Microsoft ODBC Driver for SQL Server, and pyODBC into your development environment.
David-Engel
davidengel
08/22/2023
sql
connectivity
how-to

Step 1: Configure development environment for pyodbc Python development

You need to configure your development environment with the prerequisites in order to develop an application using the pyodbc Python driver for SQL Server.

Prerequisites

  • Python 3
    • If you don't already have Python, install the Python runtime and Python Package Index (PyPI) package manager from python.org.
    • Prefer to not use your own environment? Open as a devcontainer using GitHub Codespaces.
      • Open in GitHub Codespaces.

Install the ODBC driver

This driver requires the host operating system to have the appropriate ODBC driver already installed.

  1. Obtain and install the Microsoft ODBC driver for SQL Server on Windows:

  2. Verify that you have installed the driver.

  1. Obtain and install the Microsoft ODBC driver for SQL Server on Linux:

  2. Verify that you have installed the driver.

  1. Obtain and install the Microsoft ODBC driver for SQL Server on macOS:

  2. Verify that you have installed the driver.


Install the pyodbc package

Get the pyodbc package from PyPI.

  1. Open a command prompt in an empty directory.

  2. Install the pyodbc package.

    pip install pyodbc

Check installed packages

You can use the PyPI command-line tool to verify that your intended packages are installed.

  1. Check the list of installed packages with pip list.

    pip list

Next steps

[!div class="nextstepaction"] Step 2: Create an SQL database for pyodbc Python development