2017-04-04 4 views
1

Ich versuche, cx_Oracle mit Pip installieren, aber ich bekomme diese Ausgabe in der Konsole.Probleme bei der Installation von Cx_Oracle mit Pip

(test_env1)[ [email protected] ~ ] $ pip install cx_Oracle 
Collecting cx_Oracle 
    Using cached cx_Oracle-5.3.tar.gz 
Installing collected packages: cx-Oracle 
    Running setup.py install for cx-Oracle ... error 
    Complete output from command /opt/svcacct/django/test_env1/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4525wz/cx-Oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-BoJI2V-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/svcacct/django/test_env1/include/site/python2.7/cx-Oracle: 
    running install 
    running build 
    running build_ext 
    building 'cx_Oracle' extension 
    creating build 
    creating build/temp.linux-x86_64-2.7-11g 
    creating build/temp.linux-x86_64-2.7-11g/src 
    gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/app/oracle/instantclient_11_1/sdk/include -I/usr/include/python2.7 -c src/cx_Oracle.c -o build/temp.linux-x86_64-2.7-11g/src/cx_Oracle.o -DBUILD_VERSION=5.3 
    src/cx_Oracle.c:28:2: error: #error Oracle 11.2 or later client libraries are required for building 
    #error Oracle 11.2 or later client libraries are required for building 
    ^
    error: command 'gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/opt/svcacct/django/test_env1/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-4525wz/cx-Oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-BoJI2V-record/install-record.txt --single-version-externally-managed --compile --install-headers /opt/svcacct/django/test_env1/include/site/python2.7/cx-Oracle" failed with error code 1 in /tmp/pip-build-4525wz/cx-Oracle/ 

Ich habe mein Oracle installieren in meinem env-Variablen.

+1

Sie müssen Oracle-Client von Orakel Website installieren und dann installieren Cx_Oracle – Pentux

+0

Welche Umgebungsvariablen haben Sie festgelegt? –

+0

Ich habe 'ORACLE_HOME =/app/oracle/instantclient_11_1 /' in meinem .bashrc-Profil exportieren – R2DeeTard

Antwort

2

Sie müssen sicherstellen, dass ein Oracle-Client auf Ihrem Computer installiert wurde. Am einfachsten ist die Oracle Instant Client, die Sie von hier bekommen:

http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html

Folgen Sie den Anweisungen am unteren Rand der Seite. Stellen Sie sicher, dass Sie das Paket "Basic" oder "Basic Light" sowie das Paket "SDK" installiert haben. Das Paket "SDK" wird nur zum Erstellen von cx_Oracle benötigt.

Verwandte Themen