Search code examples
pythonsql-servercentos7freetds

Python 3.6.1 module _mssql can not find libsybdb-89a09a88.so.5.1.0


I've compiled and installed python 3.6.1 in Centos 7 and copied pymssql.so and _mssql.so file to /usr/local/lib/python3.6 folder.

And finally after long time managed to import pymssql. But get error that can't find this file:

libsybdb-89a09a88.so.5.1.0

Even copied libsybdb.so.5.1.0 to /usr/local/lib, but didn't get any results.


Solution

  • I've finally downloaded latest version of python (3.7.3) source and compile it.

    Before compile installed these packages:

    libsqlite3 (Debian based) or sqlite-devel (RedHat based)

    zlib-devel
    openssl-devel
    libffi-devel
    

    And executed ./configure file in python source folder:

    ./configure --with-openssl=/usr/include/openssl/ --enable-optimizations
    
    sudo make 
    
    sudo make altinstall
    

    With reference to this python threads:

    https://bugs.python.org/msg321740

    https://bugs.python.org/issue31652