PyODBC : can't open the driver even if it exists

后端 未结 7 1127
一向
一向 2020-12-31 01:03

I\'m new to the linux world and I want to query a Microsoft SQL Server from Python. I used it on Windows and it was perfectly fine but in Linux it\'s quite painful.

7条回答
  •  醉话见心
    2020-12-31 01:27

    The following suggestions may help to solve the problem:

    • Make sure the drive configuration INI file exists odbcinst -j (check odbcinst.ini).
    • Make sure the filepath to configured driver from your INI file (run: odbcinst -j) exist and has read and executable permission flags (O_RDONLY|O_CLOEXEC).
    • If you still got file not found error, despite the file exists, the problem could be related to libgcc version mismatch as per nehaljwani's GitHub comment. The solution is to update your libgcc by running conda update libgcc command.

      Related: ODBC Driver 13 for SQL Server can't open lib on pyodbc while connecting on AWS E2 ubuntu instance.

    • For macOS, see: Installing ODBC via HomeBrew.

提交回复
热议问题