From: Dan H. <dan...@re...> - 2019-05-03 00:36:07
|
Thanks. I finally got it working after installing python-sybase-0.40pre2.tar.gz <http://downloads.sourceforge.net/python-sybase/python-sybase-0.40pre2/python-sybase-0.40pre2.tar.gz>. I had assumed that the "pre" versions weren't production-ready, but I gave it a go anyway. I'll have a look at the ODBC alternatives On Fri, 3 May 2019 at 11:27, Bond, Gregory <GB...@vi...> wrote: > This module is mostly abandoned now that Sybase supports ODBC drivers. > You’d be better to look at pyodbc/unixodbc packages, assuming it’s > supported on your platform. > > > > *From:* Dan Horne <dan...@re...> > *Sent:* Friday, 3 May 2019 7:36 AM > *To:* pyt...@li... > *Subject:* [Python-sybase-misc] Unable to import Sybase library > > > > Hi > > > > As a test of the Python-sybase install I get: > > > > # python > > Python 2.7.5 (default, Sep 12 2018, 05:31:16) > > [GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import Sybase > > Traceback (most recent call last): > > File "<stdin>", line 1, in <module> > > File "build/bdist.linux-x86_64/egg/Sybase.py", line 11, in <module> > > File "build/bdist.linux-x86_64/egg/sybasect.py", line 7, in <module> > > File "build/bdist.linux-x86_64/egg/sybasect.py", line 6, in __bootstrap__ > > ImportError: > /root/.python-eggs/python_sybase-0.39-py2.7-linux-x86_64.egg-tmp/sybasect.so: > undefined symbol: ct_callback > > > > So I ran ldd > > > > # ldd > /root/.python-eggs/python_sybase-0.39-py2.7-linux-x86_64.egg-tmp/sybasect.so > > linux-vdso.so.1 => (0x00007ffc5614c000) > > libpython2.7.so.1.0 => /lib64/libpython2.7.so.1.0 > (0x00007f91552e3000) > > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f91550c7000) > > libc.so.6 => /lib64/libc.so.6 (0x00007f9154cfa000) > > libdl.so.2 => /lib64/libdl.so.2 (0x00007f9154af6000) > > libutil.so.1 => /lib64/libutil.so.1 (0x00007f91548f3000) > > libm.so.6 => /lib64/libm.so.6 (0x00007f91545f1000) > > /lib64/ld-linux-x86-64.so.2 (0x00007f91558d2000) > > > > We are using FreeTDS (0.95.81). I'm pretty sure that it's installed > correctly since I can connect from Perl via DBD::Sybase (note I'm a Perl > programmer, not a Python one, but I need to set this up for Python devs. > Hence I may be missing/misunderstanding things) > > > > > > > > This message, including any attachments, is intended only for the personal > and confidential use of the designated recipient(s) to which it is > addressed. This communication may contain information that constitutes > attorney work product, is privileged, confidential or otherwise protected > from disclosure. If the reader of this message is not the designated > recipient, you are hereby notified that you have received this > communication in error, and that any review, dissemination, retention, > distribution or copying of this communication is strictly prohibited. If > you have received this communication in error, please notify us by e-mail > reply to the sender, and discard any paper copies and delete all electronic > files of this communication. This communication is for informational > purposes only and has been obtained from sources believed to be reliable, > but it is not necessarily complete and its accuracy cannot be guaranteed. > It is not intended as an offer or solicitation for the purchase or sale of > any financial instrument or as an official confirmation of any transaction. > Moreover, this material should not be construed to contain any > recommendation regarding, or opinion concerning, any security. Any views > expressed in this message are those of the individual sender, except where > the message states otherwise and the sender is authorized to state them to > be the views of any such entity. > > Virtu ITG Hong Kong Limited is licensed by the Securities and Futures > Commission of Hong Kong, Virtu ITG Singapore Pte Limited is licensed by the > Monetary Authority of Singapore and Virtu ITG Australia Limited is licensed > by the Australian Securities and Futures Commission. > > Virtu and/or its affiliates reserve the right to monitor and archive all > electronic communications through its network. Virtu Financial LLC > <http://www.virtu.com/>. > > > > |