Re: [cx-oracle-users] pip install error on RHEL 7 with Oracle 11g
Brought to you by:
atuining
|
From: christopher j. <chr...@or...> - 2015-04-16 21:26:34
|
On 4/16/15 2:13 PM, Shai Berger wrote:
> On Thursday 16 April 2015 23:54:21 Simon Chang wrote:
>> Hi,
>>
>> The README.txt says:
>> "Please note that an Oracle client (or server) installation is required in
>> order to use cx_Oracle."
>>
>> However, when I pip install on a RHEL 7 server that already has Oracle 11g
>> installed, I got this error:
>>
>> Traceback (most recent call last):
>> File "<string>", line 17, in <module>
>> File "/tmp/pip-build-JK3O5z/cx-Oracle/setup.py", line 135, in
>> <module> raise DistutilsSetupError("cannot locate an Oracle software " \
>> distutils.errors.DistutilsSetupError: cannot locate an Oracle software
>> installation
>>
>> Can someone please advise what I'm missing?
>>
> In order for setup.py to find the Oracle installation, you need to set the
> ORACLE_HOME environment variable. For the Oracle client libraries to load, you
> also need to add the folder where they are installed to LD_LIBRARY_PATH (with
> a server installation, typically, the value to add to LD_LIBRARY_PATH is
> "$ORACLE_HOME/lib").
>
> HTH,
> Shai.
>
This seems a convient time to mention that the future cx_Oracle 5.2
setup.py [1] looks for Instant Client RPMs on Linux if ORACLE_HOME
isn't set. It also uses rpath in this case. This all means that
installing and using cx_Oracle with IC RPMs won't require variables to
be set. They will still be needed when using an ORACLE_HOME install [2].
Chris
[1] https://bitbucket.org/anthony_tuininga/cx_oracle/src/aaa8ec33b2c3358e3be50eee4dcfd852fd44efa7/setup.py?at=default
[2] though you can explicitly enable rpath, so LD_LIBRARY_PATH isn't needed.
--
chr...@or... http://twitter.com/ghrd
|