Search code examples
pythonmysqlmacospymssql

Getting "undeclared identifier DBVERSION_80" when installing pymssql using pip


When I install pymssql on my mac with 'pip install pymssql' it fails with undeclared identifier DBVERSION_80.

What's wrong?enter image description here


Solution

  • Did you try this:

    brew install freetds
    

    Source: http://pymssql.org/en/latest/intro.html

    If you get this error:

    __pyx_r = DBVERSION_80;
                  ^
    1 error generated.
    

    then you can fix it with this:

    brew unlink freetds
    brew install homebrew/versions/freetds091
    

    and then install:

    pip install pymssql
    

    source: https://github.com/pymssql/pymssql/issues/432