简体   繁体   中英

pymssql on mac os x mountain lion 10.9.2

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?

您需要安装 freetds 库才能与 Microsoft SQL Server 通信

brew install freetds

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM