Step 1: Configure development environment for pymssql Python development
You will need to configure your development environment with the prerequisites in order to develop an application using the Python Driver for SQL Server.
The Python SQL Drivers use the TDS protocol, which is enabled by default in SQL Server and Azure SQL Database. No additional configuration is required.
Windows
Install Python runtime and pip package manager.
a. Go to python.org
b. Click on the appropriate Windows installer msi link.
c. Once downloaded run the msi to install Python runtimeDownload pymssql module from here
Make sure you choose the correct
whlfile. For example: If you are using Python 2.7 on a 64-bit machine choosepymssql‑2.1.1‑cp27‑none‑win_amd64.whl. Once you download thewhlfile, place it in the C:\Python27 folder.Open cmd.exe
Install pymssql module.
For example, if you are using Python 2.7 on a 64-bit machine:
> cd c:\Python27
> pip install pymssql‑2.1.1‑cp27‑none‑win_amd64.whl
Ubuntu Linux
- Install Python runtime and pip package manager. Python comes pre-installed on most distributions of Ubuntu. If your machine does not have python installed, you can either download the source tarball from python.org and build locally, or you can use the package manager:
> sudo apt-get install python
Open terminal
Install pymssql module and dependencies
> sudo apt-get --assume-yes update
> sudo apt-get --assume-yes install freetds-dev freetds-bin
> sudo apt-get --assume-yes install python-dev python-pip
> sudo pip install pymssql
macOS
Install Python runtime and pip package manager
a. Go to python.org
b. Click on the appropriate macOS installer pkg link.
c. Once downloaded run the pkg to install Python runtimeOpen terminal
Install Homebrew package manager
> ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install FreeTDS module
> brew install FreeTDS
- Install pymssql module
> sudo -H pip install pymssql
Povratne informacije
Pošalјite i prikažite povratne informacije za