Step 1: Configure development environment for pyodbc Python development
This article explains how to configure your development environment for pyodbc Python development.
Connect to SQL Database by using Python - pyodbc on Windows:
Download Python installer. If your machine doesn't have Python, install it. Go to the Python download page and download the appropriate installer. For example, if you are on a 64-bit machine, download the Python 2.7 or 3.10 (x64) installer.
Install Python. Once the installer is downloaded, do the following steps:
- Double-click the file to start the installer.
- Select your language, and agree to the terms.
- Follow the instructions on the screen to install Python on your computer.
- You can verify that Python is installed by going to a command prompt and running
py -V(for 3.x). You can also search for Python in the start menu.
Open cmd.exe as an administrator.
Install pyodbc using pip - Python package manager. (Replace
C:\Python27\Scriptswith your installed Python path)
cd C:\Python27\Scripts pip install pyodbc
Connect to SQL Database by using Python - pyodbc:
sudo -H pip install pyodbc
Submit and view feedback for