Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error Installing pymssql on Mac OS X Yosemite

I receive the following error when installing pymssql on OS X Yosemite 10.10.3 - has anyone gotten around the following error? I am using FreeTDS (v0.91.112) version 7.1 and Python 2.7.6 - the tsql utility connects to a SQL Database with no issue.

sudo pip install pymssql

Error:

Command "/usr/bin/python -c "import setuptools, tokenize;
__file__='/private/tmp/pip-build-T5Usla/pymssql/setup.py';
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n',
'\n'), __file__, 'exec'))" install --record /tmp/pip-uZGqK4-record/install-
record.txt --single-version-externally-managed --compile" failed with error
code 1 in /private/tmp/pip-build-T5Usla/pymssql
like image 513
Joseph Idziorek Avatar asked Jun 04 '15 14:06

Joseph Idziorek


1 Answers

You should be able to install pymmsql on your Mac for Azure SQL DB by following these three steps.

Step 1: Install Homebrew Go to your terminal and run the following command :

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Step 2 : Install FreeTDS. From the terminal run the following command :

brew install freetds

This should install freetds on your system

Step 3 : Install pymmsql. From the terminal run the following command

sudo -H pip install pymssql

Now you should be able to use pymssql to connect to Azure SQL DB and SQL Server.

like image 102
meet-bhagdev Avatar answered Oct 31 '22 14:10

meet-bhagdev