Επεξεργασία

Κοινή χρήση μέσω


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.

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