美文网首页
pyodbc collate_byname failed to

pyodbc collate_byname failed to

作者: 小松鼠爱大米 | 来源:发表于2019-02-18 15:20 被阅读0次

    python3  pyodbc connect  error

    libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: collate_byname<char>::collate_byname failed to construct for C/en_US.UTF-8/C/C/C/C

    Abort trap: 6

    解决方案:

    设置电脑的语言环境

    export  LC_ALL=en_US.UTF-8

    export  LANG=en_US.UTF-8

    或者 

    import pyodbc

    import locale

    locale.resetlocale()

    pyodbc.connect(driver='{ODBC Driver 17 for SQL Server}', ...)

    参考:https://github.com/mkleehammer/pyodbc/issues/399

    相关文章

      网友评论

          本文标题:pyodbc collate_byname failed to

          本文链接:https://www.haomeiwen.com/subject/aubaeqtx.html