使用 pip 安装 pymssql 时获取 "undeclared identifier DBVERSION_80"

Getting "undeclared identifier DBVERSION_80" when installing pymssql using pip

当我使用 'pip install pymssql' 在我的 mac 上安装 pymssql 时,它失败并显示 undeclared identifier DBVERSION_80

怎么了?

你试过这个吗:

brew install freetds

来源:http://pymssql.org/en/latest/intro.html

如果出现此错误:

__pyx_r = DBVERSION_80;
              ^
1 error generated.

然后你可以用这个修复它:

brew unlink freetds
brew install homebrew/versions/freetds091

然后安装:

pip install pymssql

来源:https://github.com/pymssql/pymssql/issues/432