Mac Environment: 10.11.6 (15G31)
python:2.7.10
sudo pip install pymssql after the following issue occurs:
Setup.py:Not using bundled FreeTDSsetup.py:include_dirs = ['/usr/local/include ']setup.py:library_dirs = ['/usr/local/ Lib ']running installrunning buildrunning build_extbuilding ' _mssql ' extensioncreating buildcreating build/ Temp.macosx-10.11-intel-2.7cc-fno-strict-aliasing-fno-common-dynamic-arch I386-arch x86_64-g-os-pipe-fno-common- Fno-strict-aliasing-fwrapv-denable_dtrace-dmacosx-dndebug-wall-wstrict-prototypes-wshorten-64-to-32-dndebug-g- Fwrapv-os-wall-wstrict-prototypes-denable_dtrace-arch I386-arch X86_64-pipe-i/usr/local/include-i/system/library /frameworks/python.framework/versions/2.7/include/python2.7-c _mssql.c-o Build/temp.macosx-10.11-intel-2.7/_ Mssql.o-dmsdblib_mssql.c:266:10:fatal error: ' sqlfront.h ' File not found#include ' sqlfront.h ' ^1 error Generated.error: Command ' CC ' failed with exit status 1 ----------------------------------------command "/usr/bin/python-u-C" Import Setuptools, tokenize;__file__= '/PRIVATE/TMP/PIP-BUILD-6AFCqj/pymssql/setup.py '; f=getattr (tokenize, ' open ', open) (__file__); Code=f.read (). replace (' \ r \ n ', ' \ n '); F.close (); EXEC (Compile (code, __file__, ' exec ')) "Install--record/tmp/pip-q1ludg-record/install-record.txt-- Single-version-externally-managed--compile "failed with error code 1 in/private/tmp/pip-build-6afcqj/pymssql/ Solution: Brew unlink freetdsbrew Install [email protected]brew link--force[email protected]sudo pip install pymssql
Solve the problem of installing pymssql under Mac