error while importing pymssql

1,989 views
Skip to first unread message

Hilkiah Lavinier

unread,
May 7, 2014, 6:41:04 PM5/7/14
to pym...@googlegroups.com

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?

Thanks in advance. HL

Marc Abramowitz

unread,
May 12, 2014, 6:44:11 PM5/12/14
to pym...@googlegroups.com
You will want to install FreeTDS to solve this error.

Probably the easiest way is to use Homebrew if you have that. `brew install freetds`

I think MacPorts also has it. Or you could download it yourself and do `./configure && make && make install`.


--
You received this message because you are subscribed to the Google Groups "pymssql" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pymssql+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages