473,763 Members | 6,149 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

import cx_Oracle fails!

Hello from Brazil :-)

I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11
(suckz) and Oracle 10.1.0 64bits without success

I've already tryied the suggestions from Bernard Delmée and Martin v.
Löwis (topic "Python 2.3b1 + cx_oracle 3.0 on HP-UX"), but it didn't
work, even when I recompiled Python with the "-lc -lpthread" options.
The result was:
import cx_Oracle /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failed to load
/usr/local/lib/python2.4/site-packages/cx_Oracle.sl


Any other suggestion?

Thank you all in advance!

Jul 19 '05 #1
5 3835
"Daniel" <da********@gma il.com> wrote in
news:11******** *************@f 14g2000cwb.goog legroups.com:
Hello from Brazil :-)

I'm trying to bring cx_Oracle alive on my Python 2.4.1 @ HP-UX 11
(suckz) and Oracle 10.1.0 64bits without success

I've already tryied the suggestions from Bernard Delmée and Martin v.
Löwis (topic "Python 2.3b1 + cx_oracle 3.0 on HP-UX"), but it didn't
work, even when I recompiled Python with the "-lc -lpthread" options.
The result was:
import cx_Oracle /usr/lib/dld.sl: Can't shl_load() a library containing Thread Local
Storage: /usr/lib/libcl.2
/usr/lib/dld.sl: Exec format error
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: Failed to load
/usr/local/lib/python2.4/site-packages/cx_Oracle.sl


Any other suggestion?

Thank you all in advance!


I got similar errors when first trying to use DCOracle2 on HPUX.

The solution that worked here is:

./configure --with-libs='-lcl'

Try that, if you haven't already.

--
Paul

Jul 19 '05 #2
Yes dude, it worked! :-)

Thank you very much (Muito obrigado!!!)

Jul 19 '05 #3

And, completing my answer, I'm sending you all how I finally got the
Python 2.4.1 and cx_Oracle-4.1 running on my HP-UX (sukz) box:

Box: HP-UX B.11.11

Compiling Python 2.4.1 with gcc 3.4.3
=============== =============== =======

../configure --with-libs='-lcl'

Added Makefile options:
CC= gcc -lc -lpthread

Changes on pyconfig.h:
Turn "#define _POSIX_THREADS" on
Compiling cx_Oracle-4.1:
=============== ========

Make sure to setup Oracle variables:

setenv ORACLE_HOME /oracle10/product/10.1.0
setenv ORACLE_BASE /oracle10
setenv TMPDIR /var/tmp
setenv PATH ${PATH}:$ORACLE _HOME/bin
setenv LD_LIBRARY_PATH $ORACLE_HOME/lib32
setenv SHLIB_PATH $ORACLE_HOME/lib32
setenv TNS_ADMIN $ORACLE_HOME/network/admin

Changes on setup.py:
from: libPath = os.path.join(or acleHome, "lib")
to: libPath = os.path.join(or acleHome, "lib32")
And finally:

$ python
Python 2.4.1 (#20, May 18 2005, 20:33:21)
[GCC 3.4.3] on hp-ux11
Type "help", "copyright" , "credits" or "license" for more information.
import cx_Oracle
dir(cx_Oracle) ['BINARY', 'BLOB', 'CLOB', 'CURSOR', 'Connection', 'Cursor',
'DATETIME', 'DataError', 'DatabaseError' , 'Date', 'DateFromTicks' ,
'Error', 'FIXED_CHAR', 'FNCODE_BINDBYN AME', 'FNCODE_BINDBYP OS',
'FNCODE_DEFINEB YPOS', 'FNCODE_STMTEXE CUTE', 'FNCODE_STMTFET CH',
'FNCODE_STMTPRE PARE', 'IntegrityError ', 'InterfaceError ',
'InternalError' , 'LOB', 'LONG_BINARY', 'LONG_STRING', 'NUMBER',
'NotSupportedEr ror', 'OperationalErr or', 'ProgrammingErr or', 'ROWID',
'STRING', 'SYSDBA', 'SYSOPER', 'SessionPool', 'TIMESTAMP', 'Time',
'TimeFromTicks' , 'Timestamp', 'TimestampFromT icks', 'UCBTYPE_ENTRY' ,
'UCBTYPE_EXIT', 'UCBTYPE_REPLAC E', 'Warning', '__doc__', '__file__',
'__name__', 'apilevel', 'buildtime', 'connect', 'makedsn',
'paramstyle', 'threadsafety', 'version']


Jul 19 '05 #4
Hi Daniel,

is your processor Itanium or PA? I am having a hard time
getting cx_oracle (4.1) and python (2.3.5) to cooperate on
an HP-UX 11.23 server (I see you're running 11.11).

I can compile both packages with gcc 3.4.3 either in 32-bit
(apparently the default) or 64-bit (-mlp64 gcc flag) but python
refuses to load the cx_oracle.sl shared lib...

Bernard.
Jul 19 '05 #5
Hi Bernard

My system is a PA 8K series with 4096 MB and 2 processors, running 64
bit mode OS.

I only created the recipe above after 1 week of mistakes :-), but I
don't know if it will work with your branch of patches @ 11.23 version.
I really hate HP-UX >-(, god bless BSD!!! :-D

Jul 19 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
8990
by: GrayGeek | last post by:
After cx_Oracle and the related Oracle tools for Python 2.2.3 + Boa-constructor on Win2000, I added "import cx_Oracle" to the top of a test script. It gives me an error about being unable to find the OCISetDefault entry point in 'oci.dll'. Google says nothing about this error, and neither does the cx_Oracle author. Anyone have a solution for this problem? --
1
8509
by: Greg Lindstrom | last post by:
>Shouldn't this be '/u01/app/oracle/product/9.2.0' ? Based on the following values, that's what I'd expect. I changed the ORCALE_HOME environment variable to the above suggested value and got a new error!! That's progress, right? I'm now told: cx_Oracle.DatabaseError: ORA-12154: TNS:could not resolve service name /usr/bin/sh: cx_Oracle.DatabaseError:: not found Is this any help? Thanks!
0
2632
by: Steve | last post by:
I'm posting this message here, so that someone googling here will be able to find it. I was having problems installing cx_Oracle on Solaris. The build would fail with a message: > ld: fatal: file /apps/oracle/prod/9.2/lib/libclntsh.so: wrong ELF class: ELFCLASS64 I found the solution on Grig Gheorghiu's blog. Grig had similar problems when installing on UNIX, specifically AIX. You can find his
4
1786
by: Steve | last post by:
I'm trying to run a Python program on Unix and I'm encountering some behavior I don't understand. I'm a Unix newbie, and I'm wondering if someone can help. I have a simple program: ____________________________________________ #! /home/fergs/python/bin/python import sys, os import cx_Oracle
1
2449
by: ywhpaul | last post by:
ÏÂÝd°²Ñb cx_Oracle (Oracle 9i, Python 2.4) °æ±¾°²Ñbì¶windows xp ÔÚpythonÄ¿ä›Ï®aÉúC:\Python24\cx_Oracle-docÄ¿ä›®” >>> import cx_Oracle ³ö¬F Traceback (most recent call last): File "<interactive input>", line 1, in ? ImportError: DLL load failed: ÕÒ²»µ½Ö¸¶¨µÄÄ£½M¡£ ÕÒ²»µ½†–î}ÈçºÎ½â›Q, help me
7
14713
by: Carl K | last post by:
I am trying to use this: http://python.net/crew/atuining/cx_Oracle/html/cx_Oracle.html it is a real module, right? sudo easy_install cx_Oracle did not easy_install cx_Oracle. http://www.python.org/pypi/cx_Oracle/4.3.1 doesn't give me any clue. I got the source from http://prdownloads.sourceforge.net/cx-oracle/cx_Oracle-4.3.1.tar.gz?download
1
1407
by: alf | last post by:
Hi, there is following issue: "import cx_Oracle" on windows pops up a nice 'DLL missing' window in case there indeed is no CLI.DLL (or something like that). Then the exception is raised. Catching the exception is obviously not a problem, but the popup practically blocks the application and requires user intervention. There could be a legitimate case where Oracle environment is not
3
4849
by: Benjamin Hell | last post by:
Hi! I have a problem with the cx_Oracle module (Oracle database access): On a computer with cx_Oracle version 4.1 (Python 2.4.3, Oracle 10g) I can get query results consisting of strings including non-ASCII characters, e.g. the code example below outputs "é 0xe9" (which is the correct ISO-8859-1 hex code for "é"). On a newer installation with cx_Oracle 4.3.3 (Python 2.5.1, connecting to the same Oracle 10g server) these characters are...
0
1477
by: David | last post by:
On Wed, Apr 30, 2008 at 6:42 PM, Sean Ryan <searyan@gmail.comwrote: If -v makes a difference, it is most likely due to timing. The output to console slows down your app enough so that the ImportError doesn't get raised. Try piping output to a text file. Also experiment with the -u (unbuffered output) option. Another possibility is that the python binary that runs (when you launch with -v) is different to the one that the script...
0
9386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10144
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9997
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9937
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9822
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8821
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7366
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
1
3917
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3522
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.