I have been through a couple of documentations involving FreeTDS, Wheel, git and github but nothing was working on my Windows 10 PC with Python 3.6 but I need to install it. I'm working on a project and I'm most comfortable with mssql which is already installed in my pc.
Asked
Active
Viewed 2.2k times
6
-
1Would you show us what you have tried so far, and any errors that you received? – halfer Jun 12 '17 at 08:46
-
1I succesfully installed it from pre-built wheel at http://www.lfd.uci.edu/~gohlke/pythonlibs/#pymssql – NikoNyrh Aug 29 '17 at 09:24
4 Answers
8
this seems to work from
export PYMSSQL_BUILD_WITH_BUNDLED_FREETDS=1
pip install pymssql

Community
- 1
- 1

Mallinath Biswas
- 89
- 2
-
Wheels for Python 3.6 github issue link at https://github.com/pymssql/pymssql/issues/473 – weiji14 Sep 18 '17 at 22:31
1
Remember to install FreeTDS
first.
Ubuntu/Debian:
sudo apt-get install freetds-dev
Mac OS X with Homebrew:
brew install freetds
Finally:
pip install pymssql

Benchur Wong
- 2,377
- 2
- 9
- 13
0
As the site pymssql_documentation page states that the module is deprecated,
we can use pip install "pymssql<3.0"
. It works on python 3.0 and above.
I think they should change it in the main copy area as well. as of 12/17/2019 it is still showing
pip install pymssql
, which has been updated on Nov 16 2019.

Deepak Harish
- 123
- 2
- 7
0
Just use the newest build of pymssql from gitub:
pip3 install git+https://github.com/pymssql/pymssql
Also works for python2
pip install git+https://github.com/pymssql/pymssql
UPDATE:
For macOS Big Sur Apple M1
chip processor:
- You will need to install Rosetta2 emulator for the new ARM silicon (M1 chip). I just installed Rosetta2 via terminal using:
/usr/sbin/softwareupdate --install-rosetta --agree-to-license
- Homebrew for ARM M1 chip:
arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
- Homebrew for M1 ARM command to install packages:
arch -x86_64 brew install <package>
. It is necessary to install FreeTDS before installing thepymssql
.
arch -x86_64 brew install freetds
Finally:
pip install pymssql
output:
Collecting pymssql
Using cached pymssql-2.1.5.tar.gz (167 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing wheel metadata ... done
Building wheels for collected packages: pymssql
Building wheel for pymssql (PEP 517) ... done
Created wheel for pymssql: filename=pymssql-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl size=287029
.
.
.
Successfully built pymssql
Installing collected packages: pymssql
Successfully installed pymssql-2.1.5

Milovan Tomašević
- 6,823
- 1
- 50
- 42