Re: Unable to import Sybase library

Dan Horne <[email protected]> Fri, 3 May 2019 12:05:54 +1200
Newsgroups gmane.comp.python.sybase
Message-ID <CAAt1pq+LhYS6P4CB0gkpu8QQWfmPHZEiMNLqBE-Sgjh1YSMbLg@mail.gmail.com>
--===============2511187293380052437==
Content-Type: multipart/alternative; boundary="00000000000069e89f0587f084a2"

--00000000000069e89f0587f084a2
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Thanks. I finally got it working after installing
python-sybase-0.40pre2.tar.gz
<http://downloads.sourceforge.net/python-sybase/python-sybase-0.40pre2/pyth=
on-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 <[email protected]> wrote:

> This module is mostly abandoned now that Sybase supports ODBC drivers.
> You=E2=80=99d be better to look at pyodbc/unixodbc packages, assuming it=
=E2=80=99s
> supported on your platform.
>
>
>
> *From:* Dan Horne <[email protected]>
> *Sent:* Friday, 3 May 2019 7:36 AM
> *To:* [email protected]
> *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/sybasec=
t.so
>
>         linux-vdso.so.1 =3D>  (0x00007ffc5614c000)
>
>         libpython2.7.so.1.0 =3D> /lib64/libpython2.7.so.1.0
> (0x00007f91552e3000)
>
>         libpthread.so.0 =3D> /lib64/libpthread.so.0 (0x00007f91550c7000)
>
>         libc.so.6 =3D> /lib64/libc.so.6 (0x00007f9154cfa000)
>
>         libdl.so.2 =3D> /lib64/libdl.so.2 (0x00007f9154af6000)
>
>         libutil.so.1 =3D> /lib64/libutil.so.1 (0x00007f91548f3000)
>
>         libm.so.6 =3D> /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 persona=
l
> 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 electron=
ic
> 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 o=
f
> any financial instrument or as an official confirmation of any transactio=
n.
> 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 wher=
e
> the message states otherwise and the sender is authorized to state them t=
o
> 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 t=
he
> Monetary Authority of Singapore and Virtu ITG Australia Limited is licens=
ed
> 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/>.
>
>
>
>

--00000000000069e89f0587f084a2
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">Thanks. I finally got it working after in=
stalling=C2=A0<a href=3D"http://downloads.sourceforge.net/python-sybase/pyt=
hon-sybase-0.40pre2/python-sybase-0.40pre2.tar.gz" style=3D"color:rgb(0,0,1=
53);text-decoration:none;font-family:verdana,arial,sans-serif;font-size:12p=
x;white-space:nowrap">python-sybase-0.40pre2.tar.gz</a>. I had assumed that=
 the &quot;pre&quot; versions weren&#39;t production-ready, but I gave it a=
 go anyway.</div><div dir=3D"ltr"><br></div><div>I&#39;ll have a look at th=
e ODBC alternatives</div></div><br><div class=3D"gmail_quote"><div dir=3D"l=
tr" class=3D"gmail_attr">On Fri, 3 May 2019 at 11:27, Bond, Gregory &lt;<a =
href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br></div><bl=
ockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-lef=
t-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padd=
ing-left:1ex">





<div lang=3D"EN-AU">
<div class=3D"gmail-m_7997968303728894785WordSection1">
<p class=3D"MsoNormal"><span>This module is mostly abandoned now that Sybas=
e supports ODBC drivers.=C2=A0 You=E2=80=99d be better to look at pyodbc/un=
ixodbc packages, assuming it=E2=80=99s supported on your platform.<u></u><u=
></u></span></p>
<p class=3D"MsoNormal"><span><u></u>=C2=A0<u></u></span></p>
<p class=3D"MsoNormal"><b><span lang=3D"EN-US">From:</span></b><span lang=
=3D"EN-US"> Dan Horne &lt;<a href=3D"mailto:[email protected]" target=
=3D"_blank">[email protected]</a>&gt;
<br>
<b>Sent:</b> Friday, 3 May 2019 7:36 AM<br>
<b>To:</b> <a href=3D"mailto:[email protected]" targ=
et=3D"_blank">[email protected]</a><br>
<b>Subject:</b> [Python-sybase-misc] Unable to import Sybase library<u></u>=
<u></u></span></p>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
<div>
<div>
<div>
<div>
<p class=3D"MsoNormal">Hi<u></u><u></u></p>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">As a test of the Python-sybase install I get:<u></u>=
<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<div>
<p class=3D"MsoNormal"># python<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Python 2.7.5 (default, Sep 12 2018, 05:31:16)<u></u>=
<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2<u>=
</u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Type &quot;help&quot;, &quot;copyright&quot;, &quot;=
credits&quot; or &quot;license&quot; for more information.<u></u><u></u></p=
>
</div>
<div>
<p class=3D"MsoNormal">&gt;&gt;&gt; import Sybase<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">Traceback (most recent call last):<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 File &quot;&lt;stdin&gt;&quot;, line 1, in &l=
t;module&gt;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 File &quot;build/bdist.linux-x86_64/egg/Sybas=
e.py&quot;, line 11, in &lt;module&gt;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 File &quot;build/bdist.linux-x86_64/egg/sybas=
ect.py&quot;, line 7, in &lt;module&gt;<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 File &quot;build/bdist.linux-x86_64/egg/sybas=
ect.py&quot;, line 6, in __bootstrap__<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">ImportError: /root/.python-eggs/python_sybase-0.39-p=
y2.7-linux-x86_64.egg-tmp/sybasect.so: undefined symbol: ct_callback<u></u>=
<u></u></p>
</div>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">So I ran ldd<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<div>
<p class=3D"MsoNormal"># ldd =C2=A0/root/.python-eggs/python_sybase-0.39-py=
2.7-linux-x86_64.egg-tmp/sybasect.so<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 linux-vdso.so.1 =3D&gt; =
=C2=A0(0x00007ffc5614c000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libpython2.7.so.1.0 =3D&=
gt; /lib64/libpython2.7.so.1.0 (0x00007f91552e3000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libpthread.so.0 =3D&gt; =
/lib64/libpthread.so.0 (0x00007f91550c7000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libc.so.6 =3D&gt; /lib64=
/libc.so.6 (0x00007f9154cfa000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libdl.so.2 =3D&gt; /lib6=
4/libdl.so.2 (0x00007f9154af6000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libutil.so.1 =3D&gt; /li=
b64/libutil.so.1 (0x00007f91548f3000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 libm.so.6 =3D&gt; /lib64=
/libm.so.6 (0x00007f91545f1000)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal">=C2=A0 =C2=A0 =C2=A0 =C2=A0 /lib64/ld-linux-x86-64.s=
o.2 (0x00007f91558d2000)<u></u><u></u></p>
</div>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal">We are using FreeTDS (0.95.81). I&#39;m pretty sure =
that it&#39;s installed correctly since I can connect from Perl via DBD::Sy=
base (note I&#39;m a Perl programmer, not a Python one, but I need to set t=
his up for Python devs. Hence I may be missing/misunderstanding
 things)<u></u><u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
<div>
<p class=3D"MsoNormal"><u></u>=C2=A0<u></u></p>
</div>
</div>
</div>
</div>
</div>
</div>

<div>
<p><br>
<br>
This message, including any attachments, is intended only for the personal =
and confidential use of the designated recipient(s) to which it is addresse=
d. This communication may contain information that constitutes attorney wor=
k product, is privileged, confidential or otherwise protected from disclosu=
re. If the reader of this message is not the designated recipient, you are =
hereby notified that you have received this communication in error, and tha=
t any review, dissemination, retention, distribution or copying of this com=
munication is strictly prohibited. If you have received this communication =
in error, please notify us by e-mail reply to the sender, and discard any p=
aper copies and delete all electronic files of this communication. This com=
munication is for informational purposes only and has been obtained from so=
urces believed to be reliable, but it is not necessarily complete and its a=
ccuracy cannot be guaranteed. It is not intended as an offer or solicitatio=
n for the purchase or sale of any financial instrument or as an official co=
nfirmation of any transaction. Moreover, this material should not be constr=
ued to contain any recommendation regarding, or opinion concerning, any sec=
urity. Any views expressed in this message are those of the individual send=
er, except where the message states otherwise and the sender is authorized =
to state them to be the views of any such entity. <br>
<br>
Virtu ITG Hong Kong Limited is licensed by the Securities and Futures Commi=
ssion of Hong Kong, Virtu ITG Singapore Pte Limited is licensed by the Mone=
tary Authority of Singapore and Virtu ITG Australia Limited is licensed by =
the Australian Securities and Futures Commission. <br>
<br>
Virtu and/or its affiliates reserve the right to monitor and archive all el=
ectronic communications through its network. <a href=3D"http://www.virtu.co=
m/" target=3D"_blank">Virtu Financial LLC</a>.<br>
<br>
</p><br>
<br>
</div></div>

</blockquote></div>

--00000000000069e89f0587f084a2--


--===============2511187293380052437==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline


--===============2511187293380052437==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Python-sybase-misc mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-sybase-misc

--===============2511187293380052437==--