mac安装pymssql时报错

pip install pymssql

出现的报错信息:

_mssql.c:266:10: fatal error: 'sqlfront.h' file not found

    #include "sqlfront.h"

             ^

    1 error generated.

    error: command 'gcc' failed with exit status 1

 

解决方案:

(1)brew install [email protected]

(2)brew link --force [email protected]

如果之前的配置连接已存在

Linking /usr/local/Cellar/[email protected]/0.91.112...

Error: Could not symlink etc/locales.conf

Target /usr/local/etc/locales.conf

already exists. You may want to remove it:

  rm '/usr/local/etc/locales.conf'

 

To force the link and overwrite all conflicting files:

  brew link --overwrite [email protected]

 

To list all files that would be deleted:

  brew link --overwrite --dry-run [email protected]

➜  ~ rm '/usr/local/etc/locales.conf'

➜  ~ brew link --force [email protected]

Linking /usr/local/Cellar/[email protected]/0.91.112...

Error: Could not symlink etc/pool.conf

Target /usr/local/etc/pool.conf

already exists. You may want to remove it:

  rm '/usr/local/etc/pool.conf'

 

To force the link and overwrite all conflicting files:

  brew link --overwrite [email protected]

 

To list all files that would be deleted:

  brew link --overwrite --dry-run [email protected]

➜  ~ rm '/usr/local/etc/pool.conf'

➜  ~ brew link --force [email protected]

(3)sudo pip install pymssql

成功安装完成以后可以得到以下信息

Installing collected packages: pymssql

  Running setup.py install for pymssql ... done

Successfully installed pymssql-2.1.3

 

你可能感兴趣的:(SQL,Server)