1
votes

Recently discovered pymssql and got it working on a windows machine (python 3.4). However when I try to run the script on my mac (10.9.2), I get an error when I 'import pymssql'. Note both on the windows box and on the mac, I installed via 'pip3.4 install pymssql'. Installation concluded with no errors in both cases.

This is what I get when I try to import pymssql on the mac :

Python 3.4.0 (v3.4.0:04f714765c13, Mar 15 2014, 23:02:41) [GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import pymssql Traceback (most recent call last): File "", line 1, in ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pymssql.so, 2): Library not loaded: /usr/local/lib/libsybdb.5.dylib Referenced from: /Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/pymssql.so Reason: image not found

Note pip3.4 search pymssql results in : pymssql - DB-API interface to Microsoft SQL Server for Python. (new Cython-based version) INSTALLED: 2.1.0 (latest)

Note further that /usr/local/lib/libsybdb.5.dylib does NOT exist, but then again, I couldn't find in on the windows box either (searched the C drive for libsybdb)

How do I get around this?

1

1 Answers

0
votes

You need to install freetds library to talk to Microsoft SQL Server

brew install freetds