Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pymssql Install Error

I'm trying to install FreeTDS using binaries from here, on Windows, but I can't figure out how to install binary files; a google search turned up nothing relevant. I'm installing so that the Python module Pymssql can be imported and used.

I'm getting the same error as in this post: https://github.com/pymssql/pymssql/issues/372

like image 439
Fricative Melon Avatar asked Apr 08 '16 18:04

Fricative Melon


People also ask

What is Pymssql in Python?

A simple database interface for Python that builds on top of FreeTDS to provide a Python DB-API (PEP-249) interface to Microsoft SQL Server. The 2. x branch of pymssql is built on the latest release of FreeTDS which removes many of the limitations found with older FreeTDS versions and the 1. x branch.

Is Pymssql deprecated?

The Pymssql Project is Being Discontinued #668.

How to install pymssql on Windows?

Go to python.org. b. Click on the appropriate Windows installer msi link. c. Once downloaded run the msi to install Python runtime. Download pymssql module from here. Make sure you choose the correct whl file. For example : If you are using Python 2.7 on a 64 bit machine choose : pymssql‑2.1.1‑cp27‑none‑win_amd64.whl.

How to install pymssql wheels on PyPI?

pymssql wheels are available from PyPi. To install it run: pip install -U pip pip install pymssql Most of the times this should be all what’s needed.

How to install Python SQL drivers on Windows?

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. 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 runtime

Which pymssql wheels can be used with azure?

The official pymssql wheels bundle a static copy of FreeTDS and have SSL support so they can be used to connect to Azure. On some Linux distributions pip version is too old to support all the flavors of manylinux wheels, so upgrading pip is necessary. An example of such distributions would be Ubuntu 18.04 or Python3.6 module in RHEL8 and CentOS8.


2 Answers

I fixed the problem by moving all the .h files from the FreeTDS and OpenSSL files I downloaded into where all the other .h files were in C:\Users\KAllen\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\include, and put all the .dll files with the others in C:\Users\KAllen\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\bin

like image 181
Fricative Melon Avatar answered Oct 19 '22 07:10

Fricative Melon


You can download the Windows binaries here:

https://sourceforge.net/projects/freetdswindows/

There is an executable installer in the ZIP file you download; install away. It should install the necessary binaries you need. Good luck!

like image 3
FlipperPA Avatar answered Oct 19 '22 06:10

FlipperPA