2017-02-28 2 views
0

Verwendung habe ich versucht, cx_Oracle durch pip durch Ausgabe von Befehl pip install cx_Oracle aber ich erhalte diesen Fehler zu installieren:Installation cx_Oracle pip

Collecting cx_Oracle 
    Downloading cx_Oracle-5.2.1.tar.gz (113kB) 
    100% |████████████████████████████████| 122kB 141kB/s 
Building wheels for collected packages: cx-Oracle 
    Running setup.py bdist_wheel for cx-Oracle ... error 
    Complete output from command /home/srseven/Documents/test/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yrq51gn9/cx-Oracle/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpfd_b54rwpip-wheel- --python-tag cp34: 
    running bdist_wheel 
    running build 
    running build_ext 
    building 'cx_Oracle' extension 
    creating build 
    creating build/temp.linux-x86_64-3.4-11g 
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/u01/app/oracle/product/11.2.0/xe/rdbms/demo -I/u01/app/oracle/product/11.2.0/xe/rdbms/public -I/usr/include/python3.4m -I/home/srseven/Documents/test/include/python3.4m -c cx_Oracle.c -o build/temp.linux-x86_64-3.4-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1 
    cx_Oracle.c:6:20: fatal error: Python.h: No such file or directory 
    #include <Python.h> 
        ^
    compilation terminated. 
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

    ---------------------------------------- 
    Failed building wheel for cx-Oracle 
    Running setup.py clean for cx-Oracle 
Failed to build cx-Oracle 
Installing collected packages: cx-Oracle 
    Running setup.py install for cx-Oracle ... error 
    Complete output from command /home/srseven/Documents/test/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yrq51gn9/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-k79o78ca-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/srseven/Documents/test/include/site/python3.4/cx-Oracle: 
    running install 
    running build 
    running build_ext 
    building 'cx_Oracle' extension 
    creating build 
    creating build/temp.linux-x86_64-3.4-11g 
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -I/u01/app/oracle/product/11.2.0/xe/rdbms/demo -I/u01/app/oracle/product/11.2.0/xe/rdbms/public -I/usr/include/python3.4m -I/home/srseven/Documents/test/include/python3.4m -c cx_Oracle.c -o build/temp.linux-x86_64-3.4-11g/cx_Oracle.o -DBUILD_VERSION=5.2.1 
    cx_Oracle.c:6:20: fatal error: Python.h: No such file or directory 
    #include <Python.h> 
         ^
    compilation terminated. 
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 

    ---------------------------------------- 
Command "/home/srseven/Documents/test/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-yrq51gn9/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-k79o78ca-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/srseven/Documents/test/include/site/python3.4/cx-Oracle" failed with error code 1 in /tmp/pip-build-yrq51gn9/cx-Oracle/ 

, wie diese zu lösen?

Antwort

0

Sie müssen das Python-Entwicklungspaket auf Ihrem Computer installiert haben. Dies wird normalerweise python3-devel genannt, kann aber je nach Plattform unterschiedlich sein.

+0

eigentlich war es python3-dev für mein System, das Ubuntu 14.04 ist. –