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.

Reza Akraminejad
  • 1,412
  • 3
  • 24
  • 38
  • Still nobody knows the answer of question? – Reza Akraminejad May 21 '19 at 06:54
  • On CentOS 7, you should be able to install FreeTDS 0.95 using `yum`. Is there a reason you haven't gone with this approach? If you install the `EPEL` repo, you can then `sudo yum install python36 freetds-devel` and you'll be off and running with `pyodbc`. You can also use Microsoft's ODBC driver instead of FreeTDS, if you like. – FlipperPA May 21 '19 at 23:38
  • @FlipperPA I've tried of trying multiple ways and prefere to download lastest python version (3.7.3) and compile it with ./configure --with-openssl==/usr/include/openssl/ option and hope to get the answer – Reza Akraminejad May 22 '19 at 07:00
  • You should still be able to use `sudo yum install freetds-devel unixodbc-devel` and then `pip install pydobc`, regardless of the Python version. Is that not working? – FlipperPA May 22 '19 at 21:19

1 Answers1

0

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

Reza Akraminejad
  • 1,412
  • 3
  • 24
  • 38